I want to distribute my Worklight App via the App Store. The problem is, users will have to point to different Worklight Servers depending on what company they belong to, but I don't want my users to have visibility to the Worklight Server URL or have the ability to change it themselves (meaning I want to set worklightSettings in the application-descriptor.xml to false so "Custom Server URL" does not appear in the settings).
So my idea is to initially point all my users to a default Worklight Server (in which they would only connect to the first time the start the app) which would be responsible for identifying which server they should point to based of some credentials. Once the user gives the server their credentials, it will respond with the Worklight Server URL they should connect to and then the application will set it so they will now always connect to the proper server for their company.
I know in the iPhone for example, the URL lives in worklight.plist and before I build it, I can change that value to set my url, but can I change that url after the .ipa is built without having the user manually change the "Custom Server URL" in the settings? Perhaps there's a way to change the "Custom Server URL" value programatically and always have "Use Custom URL" true, but hide it from the user in the settings?
Though not supported (at all) by Worklight, this can be accomplished. See if Anton's answer for the following question is of help:
Re-route/Divert some WL.Client Adapter Invocation traffic to WL Server through different URL (for PCI payment and security requirements)?