Symbolicating iPhone App Crash Reports

2018-12-31 00:25发布

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?

25条回答
若你有天会懂
2楼-- · 2018-12-31 01:00

I use Airbrake in my apps, which does a fairly good job of remote error logging.

Here's how I symbolicate them with atos if the backtrace needs it:

  1. In Xcode (4.2) go to the organizer, right click on the archive from which the .ipa file was generated.

  2. In Terminal, cd into the xcarchive for instance MyCoolApp 10-27-11 1.30 PM.xcarchive

  3. Enter the following atos -arch armv7 -o 'MyCoolApp.app'/'MyCoolApp' (don't forget the single quotes)

  4. I don't include my symbol in that call. What you get is a block cursor on an empty line.

  5. Then I copy/paste my symbol code at that block cursor and press enter. You'll see something like:

    -[MyCoolVC dealloc] (in MyCoolApp) (MyCoolVC.m:34)

  6. You're back to a block cursor and you can paste in other symbols.

Being able to go through your backtrace one item without re-entering the first bit is a nice time saver.

Enjoy!

查看更多
流年柔荑漫光年
3楼-- · 2018-12-31 01:02

In my case, I was dragging crash reports directly from Mail to the Organizer. For some reason, that prevented the crash reports from getting symbolicated (I'd love to know why).

Copying the crash reports to the Desktop first, and then dragging them from there to the Organizer got them symbolicated properly.

Very specific case, I know. But thought I'd share just in case.

查看更多
公子世无双
4楼-- · 2018-12-31 01:02

This is simple, after searching a lot i found clear steps to symbolicate whole crash log file.

  • copy .app , crash_report and DSYM files in a folder.
  • connect the device with xcode
  • Then go to window -> select devices -> view device logs
  • Then select this device, delete all logs .
  • drag and drop your crash on device log section . it will automatically symbolicate the crash . just right click on report and export it .

happy coding,
Riyaz

查看更多
谁念西风独自凉
5楼-- · 2018-12-31 01:03

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.

查看更多
不流泪的眼
6楼-- · 2018-12-31 01:05

We use Google Crashlytics to supervise crash logs, the feeling is very timely and convenient to use.

Document links: https://docs.fabric.io/apple/crashlytics/missing-dsyms.html#missing-dsyms

All about Missing dSYMs Fabric includes a tool to automatically upload your project’s dSYM. The tool is executed through the /run script, which is added to your Run Script Build Phase during the onboarding process. There can be certain situations however, when dSYM uploads fail because of unique project configurations or if you’re using Bitcode in your app. When an upload fails, Crashlytics isn’t able to symbolicate and display crashes, and a “Missing dSYM” alert will appear on your Fabric dashboard.

Missing dSYMs can be manually uploaded following the steps outlined below.

Note: As an alternative to the automated dSYM upload tool, Fabric provides a command-line tool (upload-symbols)) that can be manually configured to run as part of your project’s build process. See the upload-symbols section below for configuration instructions.

...

查看更多
君临天下
7楼-- · 2018-12-31 01:06

I did successfully, Now I want to share with all you guys.

These are 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)

Happy Coding.. Thanks

查看更多
登录 后发表回答