0

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

No device registered in this runtime.

在此处输入图像描述

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

4

2 回答 2

0

见这里: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
用于 OAuth 身份验证的用户身份领域的逗号分隔有序列表。领域应按优先顺序排列。此列表中第一个成功验证的领域被选为用户身份领域。如果列表为空,或者列表中的领域没有经过身份验证,则 ID 令牌不包含身份信息。此元素是可选的,默认值为空列表。

<userIdentityRealms>WASLTPARealm, CustomAuthenticatorRealm</userIdentityRealms>

注意:此属性用于在基于 OAuth 的流程中设置用户身份。对于经典(V7.0 之前)流程,请参阅customSecurityTest 安全测试的文档。

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

于 2015-06-05T10:17:46.950 回答
0

这是由于失去与 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() {}
        }]);
}
于 2015-07-03T06:52:12.460 回答