真实设备如何注册到生产 MobileFirst 7.0 Server 并被其识别?

How can a real device be registered to and recognized by the production MobileFirst 7.0 Server?

我们已经成功配置了用于测试和生产环境的 MobileFirst 7.0 服务器,并在其上部署了应用程序。但是在几台真实设备安装应用程序后(iOS 和 Android),我们在 worklightconsole 中看不到任何设备。

No device registered in this runtime.

那么如何在worklightconsole设备选项卡中识别并显示这些已经安装了应用程序的设备。

看这里:http://engtest01w.francelab.fr.ibm.com:9090/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/devref/c_the_application_descriptor.html

userIdentityRealms
A comma-separated ordered list of user identity realms for OAuth authentication. The realms should be ordered by preference. The first successfully authenticated realm in this list is selected as the user identity realm. If the list is empty, or no realm in the list was authenticated, the ID token contains no identity information. This element is optional and the default value is an empty list.

<userIdentityRealms>WASLTPARealm, CustomAuthenticatorRealm</userIdentityRealms>

Note: This attribute is used to set user identity in the OAuth-based flows. For the classic (pre-V7.0) flows, see the documentation for the customSecurityTest security test.

您需要在 application-descriptor.xml 文件中提供您的域名,以便在“设备”选项卡中列出该应用。

这是由于失去与 MF 服务器的连接造成的。

使用以下代码简单检查连接:

function wlCommonInit(){
    WL.Client.connect({
        onSuccess: onConnectSuccess,
        onFailure: onConnectFailure
    });

}

function onConnectSuccess() {
    WL.Logger.debug ("Connecting to MobileFirst Server.");
}

function onConnectFailure(data){
    WL.SimpleDialog.show("CAN NOT Connecting to MobileFirst Server", "try it again", 
        [{
            text : 'Reload',
            handler : WL.Client.reloadApp 
        },
        {
            text: 'Close',
            handler : function() {}
        }]);
}