升级到iOS 9和MobileFirst 7.1后,无法在设备或模拟器上登录应用程序

前端之家收集整理的这篇文章主要介绍了升级到iOS 9和MobileFirst 7.1后,无法在设备或模拟器上登录应用程序前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
使用Ionic和IBM MobileFirst构建的混合应用程序在通过XCode构建并部署到设备或通过iOS模拟器升级到iOS 9和MF 7.1后无法登录.

我在Eclipse中的本地WebSphere Liberty服务器上运行它,因此没有涉及SSH,因此遵循指令从下面的链接禁用bitcode和ATS,但没有任何效果.

https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/

然而,应用程序可以使用MF Mobile Browser Simulator登录,它只在尝试登录设备或iOS模拟器时失败,所以我确定这与构建过程有关,而不是应用程序错误.

这是我得到的日志跟踪,似乎没有找到服务器IP(我已经模糊),但这是我本地Liberty服务器的正确IP

其他人有类似问题吗?任何帮助将非常感激!

  1. 2015-10-20 14:01:02.269 WorkManagement[26452:2390658] DiskCookieStorage changing policy from 2 to 0,cookie file: file:///Users/Eugene/Library/Developer/CoreSimulator/Devices/49A9535D-0085-4FD6-A57F-A45D0F7E7819/data/Containers/Data/Application/86E6CEFF-F2E5-4523-9763-A421A1A64659/Library/Cookies/com.WorkManagement.binarycookies
  2. 2015-10-20 14:01:02.427 WorkManagement[26452:2390658] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667h
  3. 2015-10-20 14:01:02.453 WorkManagement[26452:2390658] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667 h
  4. 2015-10-20 14:01:02.455 WorkManagement[26452:2390658] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x7f91936521e0>.
  5. 2015-10-20 14:01:02.494 WorkManagement[26452:2391815] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:71 :: {
  6. "application id" = WorkManagement;
  7. "application version" = "1.0";
  8. authenticitySharedData = "${authenticitySharedData}";
  9. buildtime = 1445346036;
  10. environment = iphone;
  11. host = "ip-XXX-XX-X-XX.eu-west-1.compute.internal";
  12. ignoredFileExtensions = "";
  13. platformVersion = "7.1.0.0";
  14. port = 10080;
  15. protocol = http;
  16. testWebResourcesChecksum = false;
  17. wlAppFamily = "";
  18. wlMainFile = "index.html";
  19. wlSecureDirectUpdatePublicKey = "";
  20. wlServerContext = "/dlr-mxr-mobile-wm/";
  21. wlShareCookies = "";
  22. wlShareUserCert = false;
  23. wlUid = "JIl9TfKyrbvMt7TN91OoYw==";
  24. }
  25. 2015-10-20 14:01:02.496 WorkManagement[26452:2391815] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:127 :: At first launch
  26. 2015-10-20 14:01:02.501 WorkManagement[26452:2391815] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:153 :: Web resources should not be extracted.
  27. 2015-10-20 14:01:03.750 WorkManagement[26452:2390658] Apache Cordova native platform version 3.7.0 is starting.
  28. 2015-10-20 14:01:03.750 WorkManagement[26452:2390658] Multi-tasking -> Device: YES,App: YES
  29. 2015-10-20 14:01:03.756 WorkManagement[26452:2390658] Unlimited access to network resources
  30. 2015-10-20 14:01:03.757 WorkManagement[26452:2390658]
  31.  
  32. Started backup to iCloud! Please be careful.
  33. Your application might be rejected by Apple if you store too much data.
  34. For more information please read "iOS Data Storage Guidelines" at:
  35. https://developer.apple.com/icloud/documentation/data-storage/
  36. To disable web storage backup to iCloud,set the BackupWebStorage preference to "local" in the Cordova config.xml file
  37.  
  38. 2015-10-20 14:01:03.762 WorkManagement[26452:2390658] [CDVTimer][wlapp] 1.286030ms
  39. 2015-10-20 14:01:03.763 WorkManagement[26452:2390658] [CDVTimer][push] 1.507044ms
  40. 2015-10-20 14:01:03.764 WorkManagement[26452:2390658] [CDVTimer][TotalPluginStartup] 3.289998ms
  41. 2015-10-20 14:01:03.806 WorkManagement[26452:2390658] Resetting plugins due to page load.
  42. 2015-10-20 14:01:04.178 WorkManagement[26452:2390658] Finished load of: file:///Users/Eugene/Library/Developer/CoreSimulator/Devices/49A9535D-0085-4FD6-A57F-A45D0F7E7819/data/Containers/Bundle/Application/B76AFE6B-15B9-4651-9230-30123351DB91/WorkManagement.app/www/default/index.html#/login
  43. 2015-10-20 14:01:06.407 WorkManagement[26452:2391782] [DEBUG] [NONE] ondeviceready event dispatched
  44. 2015-10-20 14:01:06.411 WorkManagement[26452:2391782] [DEBUG] [NONE] wlclient init started
  45. 2015-10-20 14:01:06.412 WorkManagement[26452:2391754] [DEBUG] [NONE] Read cookies: null
  46. 2015-10-20 14:01:06.413 WorkManagement[26452:2390658] log1
  47. 2015-10-20 14:01:06.413 WorkManagement[26452:2391755] [DEBUG] [NONE] CookieMgr read cookies: {}
  48. 2015-10-20 14:01:06.422 WorkManagement[26452:2391755] [DEBUG] [NONE] before: initOptions.onSuccess
  49. 2015-10-20 14:01:06.424 WorkManagement[26452:2391755] [DEBUG] [NONE] after: initOptions.onSuccess
  50. 2015-10-20 14:01:06.424 WorkManagement[26452:2391782] [DEBUG] [NONE] added onPause and onResume event handlers
  51. 2015-10-20 14:01:06.425 WorkManagement[26452:2392040] [DEBUG] [NONE] wlclient init success
  52. 2015-10-20 14:01:06.434 WorkManagement[26452:2391754] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  53. 2015-10-20 14:01:07.600 WorkManagement[26452:2390658] In $auth factory - authString : QkxMT1lEOm1heGltbw==
  54. 2015-10-20 14:01:07.600 WorkManagement[26452:2390658] username : BLLOYD
  55. 2015-10-20 14:01:07.601 WorkManagement[26452:2390658] password : maximo
  56. 2015-10-20 14:01:07.659 WorkManagement[26452:2392040] [DEBUG] [NONE] establishSSLClientAuth
  57. 2015-10-20 14:01:07.662 WorkManagement[26452:2390658] [WARN] [USER_CERT_AUTH] +[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.WorkManagement
  58. 2015-10-20 14:01:07.671 WorkManagement[26452:2390658] THREAD WARNING: ['UserAuth'] took '10.719238' ms. Plugin should use a background thread.
  59. 2015-10-20 14:01:07.672 WorkManagement[26452:2392040] [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false
  60. 2015-10-20 14:01:07.673 WorkManagement[26452:2391782] [DEBUG] [NONE] Request [/apps/services/api/WorkManagement/iphone/query]
  61. 2015-10-20 14:01:07.673 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  62. 2015-10-20 14:01:07.677 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  63. 2015-10-20 14:01:07.678 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
  64. 2015-10-20 14:01:07.710 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
  65. 2015-10-20 14:01:07.719 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  66. 2015-10-20 14:01:07.720 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
  67. 2015-10-20 14:01:07.722 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
  68. 2015-10-20 14:01:07.723 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance) with headers:
  69. {
  70. "Accept-Language" = "en-US";
  71. "User-Agent" = "WorkManagement/1.0 (iPhone; iOS 9.0; Scale/2.00)/WLNativeAPI/7.1.0.0";
  72. "X-Requested-With" = XMLHttpRequest;
  73. "x-wl-app-version" = "1.0";
  74. "x-wl-device-id" = "9263C520-E277-4D6B-A076-1D68915D78E3";
  75. "x-wl-platform-version" = "7.1.0.0";
  76. }
  77. You can see the request body in the Analytics platform logs.
  78. 2015-10-20 14:01:07.731 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
  79. 2015-10-20 14:01:07.732 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x7f919340bb50>{number = 1,name = main})
  80. 2015-10-20 14:01:07.733 WorkManagement[26452:2390658] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '61.285889' ms. Plugin should use a background thread.
  81. 2015-10-20 14:01:07.744 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:352 :: Request Failed
  82. 2015-10-20 14:01:07.744 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:353 :: Response Status Code : 0
  83. 2015-10-20 14:01:07.746 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:354 :: Response Error : A server with the specified hostname could not be found.
  84. 2015-10-20 14:01:07.748 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  85. 2015-10-20 14:01:07.748 WorkManagement[26452:2390658] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:486 :: Status code='0' error='A server with the specified hostname could not be found.' response='(null)'
  86. 2015-10-20 14:01:07.749 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:489 :: Response Header: (null)
  87. Response Data: (null)
  88. 2015-10-20 14:01:07.749 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration Failed
  89. 2015-10-20 14:01:07.753 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
  90. 2015-10-20 14:01:07.759 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
  91. 2015-10-20 14:01:07.762 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  92. 2015-10-20 14:01:07.774 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  93. 2015-10-20 14:01:07.781 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  94. 2015-10-20 14:01:07.781 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
  95. 2015-10-20 14:01:07.812 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
  96. 2015-10-20 14:01:07.818 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  97. 2015-10-20 14:01:07.819 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
  98. 2015-10-20 14:01:07.820 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
  99. 2015-10-20 14:01:07.821 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance) with headers:
  100. {
  101. "Accept-Language" = "en-US";
  102. "User-Agent" = "WorkManagement/1.0 (iPhone; iOS 9.0; Scale/2.00)/WLNativeAPI/7.1.0.0";
  103. "X-Requested-With" = XMLHttpRequest;
  104. "x-wl-app-version" = "1.0";
  105. "x-wl-device-id" = "9263C520-E277-4D6B-A076-1D68915D78E3";
  106. "x-wl-platform-version" = "7.1.0.0";
  107. }
  108. You can see the request body in the Analytics platform logs.
  109. 2015-10-20 14:01:07.822 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
  110. 2015-10-20 14:01:07.822 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x7f919340bb50>{number = 1,name = main})
  111. 2015-10-20 14:01:07.823 WorkManagement[26452:2390658] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '47.751953' ms. Plugin should use a background thread.
  112. 2015-10-20 14:01:07.829 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:352 :: Request Failed
  113. 2015-10-20 14:01:07.830 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:353 :: Response Status Code : 0
  114. 2015-10-20 14:01:07.831 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:354 :: Response Error : A server with the specified hostname could not be found.
  115. 2015-10-20 14:01:07.832 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
  116. 2015-10-20 14:01:07.833 WorkManagement[26452:2390658] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:486 :: Status code='0' error='A server with the specified hostname could not be found.' response='(null)'
  117. 2015-10-20 14:01:07.834 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:489 :: Response Header: (null)
  118. Response Data: (null)
  119. 2015-10-20 14:01:07.834 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration Failed
  120. 2015-10-20 14:01:07.859 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
  121. 2015-10-20 14:01:07.864 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
  122. 2015-10-20 14:01:07.872 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
@H_301_14@

解决方法

使用MBS时,您基本上可以直接由服务器提供服务. MBS位于服务器内,您打开服务器IP或localhost.

使用物理设备或iOS模拟器时,您将连接到“远程”主机名.可能是DNS没有正确翻译所提到的值.

您可以通过编辑Xcode项目中的worklight.plist文件来尝试两件事:

>清空主机属性;这通常允许它自己选择一个值,似乎在iOS中可行>使用IP地址而不是主机名替换现有主机值

@H_301_14@ @H_301_14@

猜你在找的iOS相关文章