iOS 9 错误,而 运行 Worklight 6.1 应用程序

iOS 9 error while running Worklight 6.1 Application

我们已尝试 运行 iOS 9 上的 WL 6.1 Fix Pack FP02 应用程序,但在 main.m 文件中出现以下错误:

‘Application windows are expected to have a root view controller at the end of application launch’
The exception is thrown on this line of main.m:
int retVal = UIApplicationMain(argc, argv, appClass, @”MyAppDelegate”);

如有任何帮助,我们将不胜感激。

下面是来自 xcode 7 :

的堆栈跟踪
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
*** First throw call stack:
(
    0   CoreFoundation                      0x047e0a94 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x0429fe02 objc_exception_throw + 50
    2   CoreFoundation                      0x047e092a +[NSException raise:format:arguments:] + 138
    3   Foundation                          0x00f0e3e6 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118
    4   UIKit                               0x012b3568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3674
    5   UIKit                               0x012d6905 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3171 + 68
    6   UIKit                               0x012afbae -[UIApplication workspaceDidEndTransaction:] + 163
    7   FrontBoardServices                  0x07c1cccc __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
    8   FrontBoardServices                  0x07c1c7a3 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
    9   FrontBoardServices                  0x07c3a1cb -[FBSSerialQueue _performNext] + 184
    10  FrontBoardServices                  0x07c3a602 -[FBSSerialQueue _performNextFromRunLoopSource] + 52
    11  FrontBoardServices                  0x07c398fe FBSSerialQueueRunLoopSourceHandler + 33
    12  CoreFoundation                      0x046fae7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    13  CoreFoundation                      0x046f0b0b __CFRunLoopDoSources0 + 523
    14  CoreFoundation                      0x046eff28 __CFRunLoopRun + 1032
    15  CoreFoundation                      0x046ef866 CFRunLoopRunSpecific + 470
    16  CoreFoundation                      0x046ef67b CFRunLoopRunInMode + 123
    17  UIKit                               0x012af497 -[UIApplication _run] + 540
    18  UIKit                               0x012b4cc1 UIApplicationMain + 160
    19  MYAPP                               0x00100f5d main + 157
    20  libdyld.dylib                       0x04c8ba21 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

更新:

  • 使用提供的 Hello World 项目进行测试 - 失败
  • 使用最新可用的 iFix 进行测试 - 工作

请升级。


没有可以调试的适当示例很难回答,但应该注意的是,对于使用 Xcode 7 编译的应用程序要正确运行,您至少需要确保执行以下操作调整:

  1. 禁用 Bitcode,因为它目前不受支持。
  2. 正确定义 ATS(允许所有地址,或使用 HTTPS 正确设置客户端应用程序,并使用 TLS 1.2 支持正确设置服务器)。

在此处阅读有关 ATS 和 Bitcode 的更多信息:https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/

看看是否可以解决这个问题。如果没有,您必须提供复制步骤的应用程序。

您还应注意 6.1 Fix Pack 2 非常旧,作为 IBM 客户,您应该登录 IBM Fix Central 并下载最新的 iFix(适用于 Studio 和 Server)并升级。这个最新的 iFix 还包含 iOS 9 个相关修复,因此除了上述 Xcode 7.

中编译的应用程序所需的更改外,建议首先使用它进行测试

从提供的示例项目中,您甚至没有使用 Fix Pack 2,而是 1。甚至更旧...

Application windows are expected to have a root view controller at the end of application launch’

此错误是由于应用在启动后没有视图控制器可转到。这可能是因为您还没有创建一个,因为您从一个空应用程序开始,您删除了视图控制器,或者可能是您删除了主视图控制器的入口点。