问题
When you install a Worklight application onto an iPhone, in the settings there's a parameter "Custom Server URL" you can use to change the Worklight Server the app is to connect to.
I was wondering if there's such a parameter you can change on the fly on an Android device as well, or do I have to redeploy the application every time I want to change the server?
I was also wondering if it's possible to disable this feature? I'm thinking in a production scenario I probably don't want my users to be able to change the server they're pointing to.
回答1:
Indeed, the Worklight Settings feature is meant only for development time, and should (I would say even, must) be turned off when moving to production (if the intended end-user is the Public and not in-house employees where it may be useful for specific use cases...).
It is available for both (and only) Android and iOS in application-descriptor.xml
in their respective environment nodes.
You need simply change its value from the default true
to false
.
- In iOS you access it from the Settings.app
- In Android you access it by tapping on the device's physical Menu button
来源:https://stackoverflow.com/questions/19124067/ibm-worklight-how-to-use-custom-server-url