问题
Using Worklight 6.0 on Eclipse Juno.
Problem is when I build Worklight project for all environments, config.xml is generated accordingly. Now, I have to make changes every time for Android & iPhone/iPad I have to manually add all the plugins list into it.
Is there any way that I can add it once in config.xml and have it used everywhere every time?
回答1:
The config.xml
files for Android and iOS contain different structure and contents, so the answer is: No. You cannot have 1 config.xml
for both environments.
And yes, you'll need to edit each of the files with the correct plug-in structure.
Next, I do not understand what do you mean by "every time"...
The files location is:
- iOS:
native\config.xml
- Android:
native\res\xml\config.xml
You will only need to edit these files if you either rename or delete your plug-in, or delete the native folder as a whole.
If you want, you can do the following:
- For iOS: copy config.xml to the
iphone\nativeResources
folder - For Android: copy config.xml to the
android\nativeResources\res\xml
folder (if the folder doesn't exist, create it)
This way, if you ever delete the native folder, this file will be copied to it once you re-build the Worklight application.
You will still need to edit it (in the nativeResources
folder(s)) if you ever need to remove or rename a plug-in.
来源:https://stackoverflow.com/questions/21453551/ibm-worklight-6-0-is-it-possible-to-have-a-common-config-xml-for-all-environme