ios - 应用程序在 Xcode 11 上启动后立即崩溃
问题描述
在 Xcode 11 中,我的应用程序第一次运行良好,但是一旦它被杀死或崩溃,它就无法打开,它不断崩溃并显示以下错误日志
崩溃日志
1 libobjc.A.dylib 0x1866b80a4 objc_exception_throw + 55
2 CoreFoundation 0x186884ac8 +[NSException raise:format:] + 107
3 UIFoundation 0x189f1eed0 UINibDecoderDecodeObjectForValue + 407
4 UIFoundation 0x189ebb6b8 -[UINibDecoder decodeObjectForKey:] + 315
5 Foundation 0x186cb7630 -[NSLayoutConstraint initWithCoder:] + 227
6 UIFoundation 0x189f1f010 UINibDecoderDecodeObjectForValue + 727
7 UIFoundation 0x189ebb6b8 -[UINibDecoder decodeObjectForKey:] + 315
8 UIKitCore 0x18a626568 -[UIRuntimeConnection initWithCoder:] + 171
9 UIFoundation 0x189f1f010 UINibDecoderDecodeObjectForValue + 727
10 UIFoundation 0x189f1f244 UINibDecoderDecodeObjectForValue + 1291
11 UIFoundation 0x189ebb6b8 -[UINibDecoder decodeObjectForKey:] + 315
12 UIKitCore 0x18a6215b4 -[NSCoder+ 6874548 (UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 487
13 UIKitCore 0x18a6241a4 -[UINib instantiateWithOwner:options:] + 1111
14 UIKitCore 0x18a36e8b0 -[UIViewController _loadViewFromNibNamed:bundle:] + 363
15 UIKitCore 0x18a36f2ec -[UIViewController loadView] + 175
16 UIKitCore 0x18a36f5a4 -[UIViewController loadViewIfRequired] + 171
17 UIKitCore 0x18a2e1f70 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 167
18 UIKitCore 0x18a2e227c -[UINavigationController _startTransition:fromViewController:toViewController:] + 175
19 UIKitCore 0x18a2e30b0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 1135
20 UIKitCore 0x18a2e43f4 -[UINavigationController __viewWillLayoutSubviews] + 163
21 UIKitCore 0x18a2c81c8 -[UILayoutContainerView layoutSubviews] + 223
22 UIKitCore 0x18adf6d3c -[UIView+ 15088956 (CALayerDelegate) layoutSublayersOfLayer:] + 2139
23 QuartzCore 0x18d2f012c -[CALayer layoutSublayers] + 283
24 QuartzCore 0x18d2f495c CA::Layer::layout_if_needed+ 1399132 (CA::Transaction*) + 479
25 QuartzCore 0x18d300350 CA::Layer::layout_and_display_if_needed+ 1446736 (CA::Transaction*) + 135
26 QuartzCore 0x18d248edc CA::Context::commit_transaction+ 696028 (CA::Transaction*, double) + 295
27 QuartzCore 0x18d272e44 CA::Transaction::commit+ 867908 () + 675
28 UIKitCore 0x18a988f98 __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 79
29 CoreFoundation 0x18690cec4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 19
30 CoreFoundation 0x18690c664 __CFRunLoopDoBlocks + 263
31 CoreFoundation 0x1869078e0 __CFRunLoopRun + 1099
32 CoreFoundation 0x18690716c CFRunLoopRunSpecific + 463
33 GraphicsServices 0x19073f328 GSEventRunModal + 103
34 UIKitCore 0x18a971d0c UIApplicationMain + 1935
35 ------------- 0x104ea06c0 0x104e94000 + 50880
36 libdyld.dylib 0x186792424 start + 3```
解决方案
我遇到了同样的问题,这是因为UITextView
情节提要中的一个问题和 Xcode 11.2.1 GM 中修复的 Xcode 11.2 中的一个关键问题:https ://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_1_gm_seed_release_notes/
此更新修复了一个严重问题,该问题可能导致使用 UITextView 的应用程序在以前版本的 iOS、iPadOS 或 tvOS 上运行时崩溃。请参阅发行说明。
推荐阅读
- extjs - 总计(sencha:ExtJS)?
- lua - 检查一个lua函数是否是匿名的?
- database - 使用 EcipseLink 的 H2 数据库出现问题(即使没有错误,程序也不会更改数据库)
- javascript - 使用存储在数组中的数据动态构建 JSON
- scala - 在 Compute.scala 中选择 OpenCL CPU 平台
- r - R geom_bar 图的排序
- reactjs - 警告:propType 失败:提供给 [ 'View' | 的 props.style 键 'color' 无效。'RCT 视图']
- java - 如何在不翻译屏蔽的特殊字符的情况下解组 xml 文件?
- python - Python,Pandas 计算复制行的平均值
- r - 在组合地图中定义颜色