问题
I am trying to create a Worklight application that uses SQL adapters to retrieve data. In development it all works well but when I deploy it onto the server it can't connect to the server as it has an incorrect server URL.
I then have to go to the iOS settings and update the Custom Server URL field and set the flag to use this and then it all works.
I can see that this set in the Settings.bundle -> Root.plist file. However if I change this value it gets overwritten each time I rebuild. Where can I set these values so that the WL studio will set this value correctly each time it builds?
回答1:
From reading your question, this has got nothing to do with adapters.
You really need to describe how exactly you've built the application, in steps.
Right now it sounds to me like you may be doing the following:
- Build for Remote Server
- Run As >> Build All and Deploy / Run As >> Xcode project
These actions currently overwrite each other.
If you are using Build for Remote Server, then do not use Build All / Xcode project afterwards; this will overwrite the connection details again with the local ones instead of the remote ones.
Also covered in the following IBM technote: http://www-01.ibm.com/support/docview.wss?uid=swg21642937
来源:https://stackoverflow.com/questions/18381754/ibm-worklight-6-0-application-uses-an-incorrect-server-url