Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Instruments: Leaks - App crashes on launch

Tags:

Xcode Instruments: Leaks - App crashes on launch

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.

Update: Launching the "Allocations" instrument with the "Leaks" tab helps: enter image description here

like image 367
Richard Topchii Avatar asked Apr 20 '18 11:04

Richard Topchii


Video Answer


2 Answers

Actually I think this is a bug of Instruments. Try to use the Allocations template instead, then click + and add the Leaks tool.

like image 70
tdimeco Avatar answered Sep 28 '22 07:09

tdimeco


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:

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

enter image description here

I used Xcode 10.2.1 and an iPad running iOS 12.4. So to reiterate the answer (credits to user msk):

If iOS >= 12.2, provide /usr/lib/swift as a first argument for Runpath Search Paths (under "Linking" in your Build Settings).

like image 20
Toine Heuvelmans Avatar answered Sep 28 '22 08:09

Toine Heuvelmans