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?
I prefer a script that will symbolicate all my crash logs.
Preconditions
Create a folder and put there 4 things:
symbolicatecrash
perl script - there are many SO answers that tells it's locationThe archive of the build that match the crashes (from Xcode Organizer. simple as
Show in Finder
and copy) [I don't sure this is necessery]All the
xccrashpoint
packages - (from Xcode Organizer.Show in Finder
, you may copy all the packages in the directory, or the single xccrashpoint you would like to symbolicate)Add that short script to the directory:
The Script
When you run the script, you'll get 2 directories.
allCrashes
- all the crashes from all thexccrashpoint
will be there.symboledCrashes
- the same crashes but now with all the symbols.you DON'T need to clean the directory from old crashes before running the script. it will clean automatically. good luck!
In order to symbolicate crashes, Spotlight must be able to find the .dSYM file that was generated at the same time the binary you submitted to Apple was. Since it contains the symbol information, you will be out of luck if it isn't available.
I also put dsym, app bundle, and crash log together in the same directory before running symbolicate crash
Then I use this function defined in my .profile to simplify running symbolicatecrash:
The arguments added there may help you.
You can check to make sure spotlight "sees" your dysm files by running the command:
Look for the dsym you have in your directory.
NOTE: As of the latest Xcode, there is no longer a Developer directory. You can find this utility here:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash
I like to use Textwrangler to pinpoint errors in an original app upload binary rejection. (The crash data will be found in your itunesConnect account.) Using Sachin's method above I copy the original.crash to TextWrangler, then copy the symbolicatecrash file I've created to another TextWrangler file. Comparing the two files pinpoints differences. The symbolicatecrash file will have differences which point out the file and line number of problems.
Using XCode 4, the task is even simpler :
and voilà. The log file is imported and Symbolized automatically for you. Provided you Archived the build using XCode -> Product -> Archive first
Steps to analyze crash report from apple:
Copy the release .app file which was pushed to the appstore, the .dSYM file that was created at the time of release and the crash report receive from APPLE into a FOLDER.
OPEN terminal application and go to the folder created above (using
cd
command)Run
atos -arch armv7 -o APPNAME.app/APPNAME MEMORY_LOCATION_OF_CRASH
. The memory location should be the one at which the app crashed as per the report.Ex:
atos -arch armv7 -o 'APPNAME.app'/'APPNAME' 0x0003b508
This would show you the exact line, method name which resulted in crash.
Ex:
[classname functionName:]; -510
Symbolicating IPA
if we use IPA for symbolicating - just rename the extention .ipa with .zip , extract it then we can get a Payload Folder which contain app. In this case we don't need .dSYM file.
Note
This can only work if the app binary does not have symbols stripped. By default release builds stripped the symbols. We can change it in project build settings "Strip Debug Symbols During Copy" to NO.
More details see this post