我使用 XCode 8.0 将我的应用程序从 Swift 2.2 更新到 Swift 2.3 并进行了最小的更改
在调试或发布构建配置中从 XCode 运行一切正常
在 IOS 设备 9.2.1 及更低版本(即席或开发配置文件)上测试导出的存档时,我遇到了崩溃
SpringBoard[54] <Warning>: BSXPCMessage received error for message: Connection invalid
SpringBoard[54] <Warning>: BSXPCMessage received error for message: Connection invalid
timed[58] <Notice>: (Note ) CoreTime: Current mcc: '0' simulated:'0'.
SpringBoard[54] <Warning>: HW kbd: Failed to set (null) as keyboard focus
<Error>: error evaluating process info - pid: 1038, puniqueid: 1038
(UIKitApplication:) <Notice>: Service exited due to signal: Segmentation fault: 11.
这意味着它正在尝试访问无效的内存。
我曾尝试写入 NSLog 并进行跟踪,但无法找到崩溃的点。
我怀疑这可能与 XCode 7-8 中的 Storyboard 更改有关。
我一直在寻找这个错误的搜索时间已经很长时间了,因为我每次都必须创建一个存档。95% 的时间它会在启动时崩溃,但有时我会成功启动。
我在运行 IOS 9.3 或 IOS 10 的设备上启动没有问题
- - - 更新 - -
我下载了 XCode 8-1 beta,这也解决了我的问题。
所以要么使用 Xcode 7.3 或 8.1 beta+ 而不是 8.0。我浏览了 8.1 beta 的发行说明,但没有提到这个问题。
- - - 更新 - -
更新到 8.1 时向@KoCMoHaBTa 提示,此问题已解决,除非您还将部署目标更改为 9.0,此时该问题再次发生。