Add entry to iOS .plist file via Cordova config.xml

Red2678

I am new to the Cordova CLI.

I need to perform the following steps programmatically via Cordova.

  1. In the project .plist add a new row
  2. Enter the following values in the new row:
  3. Key: GDLibraryMode Type:String (default) Value:GDEnterpriseSimulation

I think I need to do this in the config.xml file in my project's root (or maybe the one in the "platforms" folder).

Can someone explain to me how to add the entry via the config.xml so that the above entry is added at compile-time?

I am using Cordova 3.3.1-0.42 (I know it is not the latest). I have already made my project and all is fine, I just need to add this entry added to the pList.

mooreds

I don't think you can do this via straight config.xml modification. At least, I didn't see any mention of this in the docs: http://cordova.apache.org/docs/en/3.3.0/config_ref_index.md.html

I think you have to create a plugin, because they can insert plist entries: http://docs.phonegap.com/en/3.3.0/plugin_ref_spec.md.html#Plugin%20Specification

See the 'config-file element' section. Here's a guess as to what the relevant section of the plugin.xml will look like:

<platform name="ios">
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
    <dict>
        <key>GDLibraryMode</key>
        <string>GDEnterpriseSimulation</string>
    </dict>
</array>
</config-file>
</platform>

Then you can install the plugin: cordova plugin add <your plugin name or file location>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cordova 3.2 ios add plugin "Which config.xml? Where is it?"

From Dev

Cordova 3.2 ios add plugin "Which config.xml? Where is it?"

From Dev

Updating Plist file via download iOS

From Dev

cordova 3.0 plugin plist config

From Dev

Cordova - Plugin and config.xml file

From Dev

iOS saving UIImage in plist via file or via nsdata?

From Dev

iOS saving UIImage in plist via file or via nsdata?

From Dev

Add an “exclude module” rule to an entry in plugin.xml for Cordova

From Dev

Cordova plugin.xml add "Header Search Paths" entry

From Dev

Add an “exclude module” rule to an entry in plugin.xml for Cordova

From Dev

FuseFabric - Add a config file via console

From Dev

Cordova/Phonegap ignores fullscreen preference in config.xml on iOS

From Dev

In meteor app how to add orgin=* in cordova config.xml?

From Dev

cordova/phonegap plugin add VS config.xml

From Dev

Yii - Add new entry in main Config file.

From Dev

Cordova: How to set Platform-specific config.xml file which is not overwritten after cordova build?

From Dev

Cordova: How to set Platform-specific config.xml file which is not overwritten after cordova build?

From Dev

Not able to create the plist file in IOS

From Dev

How do I integrate (3rd party) SDK via config.xml for Ionic/Cordova?

From Dev

Cordova platform add wp7 fail : Object #<Object> has no method 'config_xml'

From Dev

add entry to .csv file

From Dev

New Cordova project gives the error "BLD00102 : No such file or directory 'config.xml'"

From Dev

Is there a difference between Phongap config.xml and Cordova config.xml?

From Dev

Cordova: Modifying *-Info.plist from plugin.xml

From Dev

xml to use config file

From Dev

Download file via FileTransfer in Cordova

From Dev

Download file via FileTransfer in Cordova

From Dev

Issue on config.xml passing in cordova 5.2

From Dev

Getting the XPath for cordova's config.xml

Related Related

  1. 1

    Cordova 3.2 ios add plugin "Which config.xml? Where is it?"

  2. 2

    Cordova 3.2 ios add plugin "Which config.xml? Where is it?"

  3. 3

    Updating Plist file via download iOS

  4. 4

    cordova 3.0 plugin plist config

  5. 5

    Cordova - Plugin and config.xml file

  6. 6

    iOS saving UIImage in plist via file or via nsdata?

  7. 7

    iOS saving UIImage in plist via file or via nsdata?

  8. 8

    Add an “exclude module” rule to an entry in plugin.xml for Cordova

  9. 9

    Cordova plugin.xml add "Header Search Paths" entry

  10. 10

    Add an “exclude module” rule to an entry in plugin.xml for Cordova

  11. 11

    FuseFabric - Add a config file via console

  12. 12

    Cordova/Phonegap ignores fullscreen preference in config.xml on iOS

  13. 13

    In meteor app how to add orgin=* in cordova config.xml?

  14. 14

    cordova/phonegap plugin add VS config.xml

  15. 15

    Yii - Add new entry in main Config file.

  16. 16

    Cordova: How to set Platform-specific config.xml file which is not overwritten after cordova build?

  17. 17

    Cordova: How to set Platform-specific config.xml file which is not overwritten after cordova build?

  18. 18

    Not able to create the plist file in IOS

  19. 19

    How do I integrate (3rd party) SDK via config.xml for Ionic/Cordova?

  20. 20

    Cordova platform add wp7 fail : Object #<Object> has no method 'config_xml'

  21. 21

    add entry to .csv file

  22. 22

    New Cordova project gives the error "BLD00102 : No such file or directory 'config.xml'"

  23. 23

    Is there a difference between Phongap config.xml and Cordova config.xml?

  24. 24

    Cordova: Modifying *-Info.plist from plugin.xml

  25. 25

    xml to use config file

  26. 26

    Download file via FileTransfer in Cordova

  27. 27

    Download file via FileTransfer in Cordova

  28. 28

    Issue on config.xml passing in cordova 5.2

  29. 29

    Getting the XPath for cordova's config.xml

HotTag

Archive