我们有一个使用XCode 6.4编写的实时iPad应用程序,该应用程序可以在iPadOS 12、13.1、13.1.2上正常运行,但在iPadOS 13.2 Beta上崩溃。
我已经创建了该应用程序的框架版本,除了尝试通过navigationController显示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;
}
当在UIWindow的第11行上设置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)中运行OK。想知道这是否将由Apple修复,还是我们需要将代码移植到更新的XCode。