无法login到iOS实际的Device MobileFirst Project上的应用程序

您好,我最近使用IBM MobileFirst 7.1开发小型示例应用程序。 我已经成功地在模拟器上运行应用程序,它能够完美login,没有错误,但是当我在实际设备(iOS 9.2)上testing应用程序无法login这里是我收到的一些错误日志

2016-02-16 15:31:39.847 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://10.12.11.59:10080/YITCallCenter/authorization/v1/clients/instance) with headers: { "Accept-Language" = "th-TH"; "User-Agent" = "YITCallCenter/1.0 (iPhone; iOS 9.2.1; Scale/3.00)/WLNativeAPI/7.1.0.0"; "X-Requested-With" = XMLHttpRequest; "x-wl-app-version" = "1.0"; "x-wl-device-id" = "AACA3EB7-EEF1-429A-A9A7-597231D2C8B2"; "x-wl-platform-version" = "7.1.0.0"; } You can see the request body in the Analytics platform logs. 2016-02-16 15:31:39.855 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:332 :: Starting the request with URL http://10.12.11.59:10080/YITCallCenter/authorization/v1/clients/instance 2016-02-16 15:31:39.857 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x155d04d90>{number = 1, name = main}) 2016-02-16 15:31:39.860 YITCallCenter[3010:1041692] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '98.279053' ms. Plugin should use a background thread. 2016-02-16 15:31:39.933 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:345 :: Request Success 2016-02-16 15:31:39.935 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:346 :: Response Status Code : 200 2016-02-16 15:31:39.938 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/25 08:04:23 2016-02-16 15:31:39.942 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:365 :: Response Header: { "Content-Length" = 887; "Content-Type" = "application/json;charset=UTF-8"; Date = "Tue, 16 Feb 2016 08:32:14 GMT"; "X-Powered-By" = "Servlet/3.0"; } Response Data: {"certificate":"MIICfzCCAWegAwIBAgIJAPVYUEY0ukWzMA0GCSqGSIb3DQEBCwUAMGsxCzAJBgNVBAYTAklMMQswCQYDVQQIEwJJTDERMA8GA1UEBxMIU2hlZmF5aW0xDDAKBgNVBAoTA0lCTTEcMBoGA1UECxMTTW9iaWxlRmlyc3RQbGF0Zm9ybTEQMA4GA1UEAxMHTUZQIERldjAgFw0xNjAyMTYwODMyMTVaGA8yMDY2MDIxNjA4MzIxNVowWTEdMBsGCgmSJomT8ixkARkWDVlJVENhbGxDZW50ZXIxODA2BgoJkiaJk\/IsZAEBEyg2ODhiYzhkOGViYWNkNGY0M2FkYjBjMjE0NzQ0NjNiNTUwZDcwYWUwMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAM0NKuJEcSlRDEFxM6+rapjpLaNw89GH+IYF6uJy11dxJsyrwzveaD\/cLyhNrwp4riu+RpkJeFj\/JMwR1\/9dZNMCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAYaTY7AYVB\/jpRxsEHADCbzeUcSjr65qN\/0c6EgIJ3GTSXQOtpRl7ApdBot6GMeMSZbXQRFZc9OWtZ8V3ww7UOCwrWPY9RlykNqaH5ViPnTHTjBdrd0HrIb+HrK67E+FKWQhdeE5xL+YSGiQTB7IOunYCJbII91y+s\/MDwIQNppcG2FNKLoEoiDPBPnesjNXYa+sNaexXK4NhqosP8KNoac6IcOPoaLaAosnRWKd+y13vWxLCpu86UKbkA668SpUXky9I94X1NXJIFKlHKwzX4AuHji5JbkcnVLjm77rvmIujHLxrNn1LX9jTq\/ofFfiOF4ae752\/G6olUS5ln5O4SA=="} Status code=200 2016-02-16 15:31:39.944 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:424 :: NSS object is null 2016-02-16 15:31:39.948 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] BOOL hasCertificateExpired(X509 *) in WLCertManager.m:647 :: Certificate currentDate: 2016-02-16 08:31:39 +0000, expiryDate: 1523-02-16 08:32:15 +0000 2016-02-16 15:31:39.951 YITCallCenter[3010:1041692] [WARN] [CERTIFICATE_MANAGER] BOOL hasCertificateExpired(X509 *) in WLCertManager.m:649 :: Certificate has expired. Certificate expired on: 1523-02-16 08:32:15 +0000, verified on: 2016-02-16 08:31:39 +0000 2016-02-16 15:31:39.954 YITCallCenter[3010:1041692] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed 2016-02-16 15:31:39.967 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed. 2016-02-16 15:31:39.978 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed. 2016-02-16 15:31:39.986 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/25 08:04:23 2016-02-16 15:31:40.001 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] -[NotificationEx loadingStop:] in NotificationEx.m:150 :: Loading stop 2016-02-16 15:31:40.002 YITCallCenter[3010:1042149] [DEBUG] [NONE] Client registration failed with error: {"responseHeaders":{},"status":200,"responseText":"Invalid response when registering application","invocationContext":null} 2016-02-16 15:31:40.005 YITCallCenter[3010:1042108] [ERROR] [NONE] [/apps/services/api/YITCallCenter/iphone/query] failure. state: 200, response: undefined 2016-02-16 15:31:40.088 YITCallCenter[3010:1041692] THREAD WARNING: ['Notification'] took '84.625732' ms. Plugin should use a background thread. 

我认为最有趣的错误是

 [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed 

PS我已经设置了ipaddress而不是本地主机

我所有升级的7.1 iOS mobilefirst应用程序都遇到了这个问题。 我发现应用程序真实性已被默认打开为iOS的Basic(MobileFirst 7.1中的新增function),因为我在application-descriptor.xml中有一个现有的部分。 从我的application-descriptor.xml中删除安全部分,重build和重新部署wlapp文件解决了我的问题。 我遵循这个方法。

如何在IBM MobileFirst 7.1远程服务器上禁用应用程序真实性?

正如在这个答案中提到的,我build议尝试以下操作: 升级到iOS 9和MobileFirst 7.1后无法login到设备或模拟器上的应用程序

更新worklight.plist中的主机值以匹配您尝试连接的服务器。 然后看看它是否仍然失败。

我发现有移动优先本身的错误,当我设置我的iPhone日历佛教格里高利可以login的应用程序。 build议IBM出来补丁谢谢