简体   繁体   English

Xcode Instruments:泄漏 - 应用程序在启动时崩溃

[英]Xcode Instruments: Leaks - App crashes on launch

Xcode Instruments: Leaks - App crashes on launch Xcode Instruments:泄漏 - 应用程序在启动时崩溃

The app crashes on both, a device and in a Simulator.该应用程序在设备和模拟器上都崩溃。

What could cause the app to crash with the Instruments attached, while working correctly when installed using the cable or over the air via Fabric.什么可能导致应用程序在连接仪器时崩溃,而在使用电缆或通过 Fabric 无线安装时正常工作。

Update: Launching the "Allocations" instrument with the "Leaks" tab helps:更新:使用“泄漏”选项卡启动“分配”工具有助于: 在此处输入图片说明

Actually I think this is a bug of Instruments.其实我认为这是仪器的一个错误。 Try to use the Allocations template instead, then click + and add the Leaks tool.尝试改用分配模板,然后单击 + 并添加泄漏工具。

I found my answer here , but only after discovering the "Console" view in Instruments, which included the following log message right after the app appeared to crash:我在这里找到了我的答案,但只有在 Instruments 中发现“控制台”视图之后,该视图在应用程序似乎崩溃后立即包含以下日志消息:

This copy of libswiftCore.dylib requires an OS version prior to 12.2.0

在此处输入图片说明

I used Xcode 10.2.1 and an iPad running iOS 12.4.我使用了 Xcode 10.2.1 和运行 iOS 12.4 的 iPad。 So to reiterate the answer (credits to user msk ):所以重申答案(归功于用户msk ):

If iOS >= 12.2, provide /usr/lib/swift as a first argument for Runpath Search Paths (under "Linking" in your Build Settings).如果 iOS >= 12.2,提供/usr/lib/swift作为运行路径搜索路径的第一个参数(在构建设置中的“链接”下)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM