I'm looking to try and symbolicate my iPhone app's crash reports.
I retrieved the crash reports from iTunes Connect. I have the application binary that I submitted to the App Store and I have the dSYM file that was generated as part of the build.
I have all of these files together inside a single directory that is indexed by spotlight.
What now?
I have tried invoking:
symbolicatecrash crashreport.crash myApp.app.dSYM
and it just outputs the same text that is in the crash report to start with, not symbolicated.
Am I doing something wrong?
atos is being deprecated so if you are running OSX 10.9 or later you may need to run
xcrun atos
Steps to symbolicate a crash report automatically using XCode:
UPDATED FOR XCODE 9
Connect any iOS device to your Mac (yes a physical one, yes I know this is stupid)
Choose "Devices" from the "Window" menu
Click your device on the left and VIEW DEVICE LOGS on the right
Wait. It might take a minute to show up. Maybe doing
Command-A
thenDelete
will speed this up.Critical undocumented step: rename the crash report that you got from iTunesConnect from
.txt
extension to.crash
extensionDrag the crash report into that area on the left
And then Xcode will symbolicate the crash report and display the results.
Source: https://developer.apple.com/library/ios/technotes/tn2151/_index.html
Even though I had been developing apps for a few years now, this was my first time debugging a binary and I felt like a complete NOOB figuring out where all the files were i.e. where is *.app *.dSYM and crash logs? I had to read multiple posts in order to figure it out. Picture is worth a thousand words and I hope this post helps anyone else in future.
1- First go to itunesconnect and download your crash logs. NOTE: Is most cases you may get something like "Too few reports have been submitted for a report to be shown." Basically not enough users have submitted crash log reports to Apple in which case you can't do much of anything at that point.
2- Now if you had not changed your code since you had submitted your binary it to Apple then Launch Xcode for that project and do Product --> Archive again. Otherwise just find your latest submitted binary and right click on it.
With the latest version of Xcode (3.2.2), you can drag and drop any crash reports into the Device Logs section of the Xcode Organiser and they will automatically by symbolicated for you. I think this works best if you built that version of the App using Build & Archive (also part of Xcode 3.2.2)
For those using Airbrake, there's a solid response above but it wouldn't work for me without tweaking:
Works for some memory addresses but not others, not sure why...
I had to do a lot of hacking of the symbolicatecrash script to get it to run properly.
As far as I can tell, symbolicatecrash right now requires the .app to be in the same directory as the .dsym. It will use the .dsym to locate the .app, but it won't use the dsym to find the symbols.
You should make a copy of your symbolicatecrash before attempting these patches which will make it look in the dsym:
Around line 212 in the getSymbolPathFor_dsymUuid function
Around line 265 in the matchesUUID function