指向不同Worklight Server的Worklight应用程序 [英] Worklight Apps pointing to different Worklight Servers

查看:133
本文介绍了指向不同Worklight Server的Worklight应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过App Store分发我的Worklight App。问题是,用户必须根据他们所属的公司指向不同的Worklight Server,但我不希望我的用户能够看到Worklight Server URL或能够自己更改它(这意味着我想要将application-descriptor.xml中的worklightSettings设置为false,这样自定义服务器URL不会出现在设置中)。

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).

所以我的想法是最初将我的所有用户指向一个默认的Worklight Server(他们只会在第一次启动应用程序时连接),这将负责用于根据某些凭据识别应指向哪个服务器。一旦用户向服务器提供其凭据,它将使用他们应连接的Worklight Server URL进行响应,然后应用程序将对其进行设置,以便他们现在始终可以连接到公司的正确服务器。

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.

我知道在iPhone中,例如,URL存在于worklight.plist中,在构建之前,我可以更改该值以设置我的URL,但我可以更改构建.ipa之后的url,而用户没有手动更改设置中的自定义服务器URL?也许有一种方法可以以编程方式更改自定义服务器URL值并始终将使用自定义URL设置为true,但是在设置中将其隐藏起来?

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?

推荐答案

虽然Worklight不支持(根本不支持),但这可以完成。看看Anton对以下问题的回答是否有帮助:

Though not supported (at all) by Worklight, this can be accomplished. See if Anton's answer for the following question is of help:

通过不同的URL重新路由/转移一些WL.Client适配器调用流量到WL服务器(用于PCI支付和安全要求)?

这篇关于指向不同Worklight Server的Worklight应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆