我们有一个用 XCode 6.4 编写的实时 iPad 应用程序,它在 iPadOS 12、13.1、13.1.2 上运行良好,但在 iPadOS 13.2 Beta 上崩溃。
我已经创建了应用程序的骨架版本,除了尝试通过导航控制器显示 viewController 之外什么都不做。
这是代码:-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
_window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
UIViewController *viewController = [[UIViewController alloc] init];
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)];
viewController.view = view;
view.backgroundColor = [UIColor redColor];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
[_window makeKeyAndVisible];
_window.rootViewController = navigationController;
return YES;
}
崩溃发生在第 11 行的 UIWindow 上设置 rootViewController 时。如果第 10 行和第 11 行颠倒,则崩溃发生在 makeKeyAndVisible 上。
谢谢你的帮助,
Stack trace:-
OS Version: iPhone OS 13.2 (17B5059g)
Release Type: Beta
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1a6921ab8 0x1a67ef000 + 1256120
1 libobjc.A.dylib 0x1a663b028 0x1a6635000 + 24616
2 CoreFoundation 0x1a681119c 0x1a67ef000 + 139676
3 QuartzCore 0x1ad55fdc8 0x1ad401000 + 1437128
4 QuartzCore 0x1ad55fcf8 0x1ad401000 + 1436920
5 QuartzCore 0x1ad55f7cc 0x1ad401000 + 1435596
6 UIKitCore 0x1aae88ff8 0x1a9fbe000 + 15511544
7 UIKitCore 0x1aae54b60 0x1a9fbe000 + 15297376
8 UIKitCore 0x1aae8b0e4 0x1a9fbe000 + 15519972
9 UIKitCore 0x1aae8bd98 0x1a9fbe000 + 15523224
10 CoreFoundation 0x1a68f364c 0x1a67ef000 + 1066572
11 CoreFoundation 0x1a67f1300 0x1a67ef000 + 8960
12 UIKitCore 0x1aae8ae34 0x1a9fbe000 + 15519284
13 UIKitCore 0x1aae890e0 0x1a9fbe000 + 15511776
14 UIKitCore 0x1aa098a70 0x1a9fbe000 + 895600
15 UIKitCore 0x1aaea6634 0x1a9fbe000 + 15631924
16 libobjc.A.dylib 0x1a6636a4c 0x1a6635000 + 6732
17 QuartzCore 0x1ad5552b0 0x1ad401000 + 1393328
18 QuartzCore 0x1ad5555b8 0x1ad401000 + 1394104
19 UIKitCore 0x1aae91f94 0x1a9fbe000 + 15548308
20 UIKitCore 0x1aae98ad8 0x1a9fbe000 + 15575768
21 UIKitCore 0x1aa31ab9c 0x1a9fbe000 + 3525532
22 UIKitCore 0x1aa31bb58 0x1a9fbe000 + 3529560
23 UIKitCore 0x1aa31b8c0 0x1a9fbe000 + 3528896
24 UIKitCore 0x1aa3248c4 0x1a9fbe000 + 3565764
25 UIKitCore 0x1aa3c3bf8 0x1a9fbe000 + 4217848
26 UIKitCore 0x1aa3217dc 0x1a9fbe000 + 3553244
27 UIKitCore 0x1aae9d054 0x1a9fbe000 + 15593556
28 UIKitCore 0x1aae90bb8 0x1a9fbe000 + 15543224
29 UIKitCore 0x1aae90a9c 0x1a9fbe000 + 15542940
30 UIKitCore 0x1aae9fae0 0x1a9fbe000 + 15604448
31 UIKitCore 0x1aaa33234 0x1a9fbe000 + 10965556
32 UIKitCore 0x1aaa3260c 0x1a9fbe000 + 10962444
33 UIKitCore 0x1aaa335a8 0x1a9fbe000 + 10966440
34 UIKitCore 0x1aaa4478c 0x1a9fbe000 + 11036556
35 BasicNav 0x1009ded14 -[AppDelegate application:didFinishLaunchingWithOptions:] + 27924 (AppDelegate.m:30)
37 UIKitCore 0x1aa9f3008 0x1a9fbe000 + 10702856
38 UIKitCore 0x1aa9f89e0 0x1a9fbe000 + 10725856
39 UIKitCore 0x1aa1983cc 0x1a9fbe000 + 1942476
更新:相同的代码在 XCode 7 和 XCode 8 中崩溃。在 10 中运行良好(针对 iOS 10)。想知道这是否会由 Apple 修复,或者我们需要将我们的代码移植到更新的 XCode。