Symbolicating iPhone App Crash Reports

后端 未结 25 2499
迷失自我
迷失自我 2020-11-21 05:38

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

相关标签:
25条回答
  • 2020-11-21 05:41

    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.

    enter image description here

    enter image description here

    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.

    enter image description here

    enter image description here

    enter image description here

    enter image description here

    0 讨论(0)
  • I did this successfully, using the following steps.

    Step 1: Create a folder in desktop, I give name it to "CrashReport" and put three files ("MYApp.app", "MyApp.app.dSYM", "MYApp_2013-07-18.crash") in it.

    Step 2: Open Finder and go to Applications, where you will find the Xcode application, right click on this and Click "Show Package Contents", after this follow this simple path. "Contents->Developer->Platforms->iPhoneOS.platform->Developer->Library->PrivateFrameworks->DTDeviceKit.framework->Versions->A->Resources"

    OR

    "Contents->Developer->Platforms->iPhoneOS.platform->Developer->Library->PrivateFrameworks->DTDeviceKitBase.framework->Versions->A->Resources"

    OR

    For Xcode 6 and above the path is Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources

    Where you find "symbolicatecrash" file, copy this and paste it to "CrashReport" folder.

    Step 3: launch the terminal, run these 3 Command

    1. cd /Users/mac38/Desktop/CrashReport and press Enter button

    2. export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" and press Enter

    3. ./symbolicatecrash -A -v MYApp_2013-07-18.crash MyApp.app.dSYM and press Enter Now its Done.. (NOTE: versions around 6.4 or later do not have the -A option -- just leave it out).
    0 讨论(0)
  • 2020-11-21 05:43

    Steps to analyze crash report from apple:

    1. 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.

    2. OPEN terminal application and go to the folder created above (using cd command)

    3. 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

    0 讨论(0)
  • 2020-11-21 05:48

    The magical Xcode Organizer isn't that magical about symbolicating my app. I got no symbols at all for the crash reports that I got back from Apple from a failed app submission.

    I tried using the command-line, putting the crash report in the same folder as the .app file (that I submitted to the store) and the .dSYM file:

    $ symbolicatecrash "My App_date_blahblah-iPhone.crash" "My App.app"
    

    This only provided symbols for my app and not the core foundation code, but it was better than the number dump that Organizer is giving me and was enough for me to find and fix the crash that my app had. If anyone knows how to extend this to get Foundation symbols it would be appreciated.

    0 讨论(0)
  • 2020-11-21 05:48

    I prefer a script that will symbolicate all my crash logs.

    Preconditions

    Create a folder and put there 4 things:

    1. symbolicatecrash perl script - there are many SO answers that tells it's location

    2. The 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]

    3. 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)

    4. Add that short script to the directory:

      #!/bin/sh
      
      echo "cleaning old crashes from directory"
      rm -P *.crash
      rm -P *.xccrashpoint
      rm -r allCrashes
      echo "removed!"
      echo ""
      echo "--- START ---"
      echo ""
      
      mkdir allCrashes
      mkdir symboledCrashes
      find `ls -d *.xccrashpoint` -name "*.crash" -print -exec cp {} allCrashes/ \;
      
      cd allCrashes
      for crash in *.crash; do
          ../symbolicatecrash $crash > ../symboledCrashes/V$crash
      done
      cd ..
      
      echo ""
      echo "--- DONE ---"
      echo ""
      

    The Script

    When you run the script, you'll get 2 directories.

    1. allCrashes - all the crashes from all the xccrashpoint will be there.

    2. symboledCrashes - the same crashes but now with all the symbols.

    3. you DON'T need to clean the directory from old crashes before running the script. it will clean automatically. good luck!

    0 讨论(0)
  • 2020-11-21 05:50

    atos is being deprecated so if you are running OSX 10.9 or later you may need to run

    xcrun atos

    Warning: /usr/bin/atos is moving and will be removed from a future OS X release. It is now available in the Xcode developer tools to be invoked via: xcrun atos

    0 讨论(0)
提交回复
热议问题