How to symbolicate crashes in Xcode 7.3?

2019-04-06 00:07发布

Can you help me get my crashes symbolicated?

In Xcode 7.3, Window -> Organizer -> Crashes, I have crash reports from my latest TestFlight builds. They were built on this Mac, and all the archives with the corresponding dSYMs are in the Archives tab. The app is divided into a number of frameworks and the main app, and many are a mix of Swift and Objective C. In the crash log I can see the name of the frameworks and app listed correctly, but all the entries for my frameworks and app are in hex. UIKit is symbolicated just fine.

When I look in iTunes Connect, it says "Yes" to "Includes Symbols" and allows me to download the dSYMs. When building, the "Debug Information Format" option was set to "DWARF with dSYM". I tried setting "Strip Debug Symbols During Copy" and "Strip Linked Product" to "No" to see if that made a difference. It didn't.

I cannot find the symbolicatecrash app on my system, not even in /usr/bin or /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash, but I have an older Xcode 5 where I could grab it. However, it does not resolve the symbols anymore.

I have the same problem in Instruments, if I profile my app, UIKit is symbolicated just fine, but my frameworks and app only show hex.

I know there have been a lot of posts about this, but I have going through them a lot from the 7.3 beta period and until now and have not found a solution

6条回答
甜甜的少女心
2楼-- · 2019-04-06 00:38

Same here. Having a hard time finding the symbolicatecrash after upgrading to 7.3.

However, you can still use the atos though. You can find the tutorial here Symbolicate crash in iOS8 with Xcode 6 .1

查看更多
闹够了就滚
3楼-- · 2019-04-06 00:44

After reading this:

https://developer.apple.com/library/content/technotes/tn2151/_index.html

you find out that the App Store is responsible for symbolicating crash reports that come from TestFlight – not Xcode. And it appears the App Store is very unreliable at doing it.

Here's a workaround.

  1. Go to the Archives tab in the "Organizer" window and make sure that for whatever build you need to symbolicate a crash report for, you have clicked the "Download dSYMS..." button over on the right side of the page. This is required if you are uploading in BitCode.

  2. Attach an iOS device so that it appears in the "Devices" window.

  3. Select the device and click "View Device Logs".

  4. Now, go back to the Organizer Window, select the "Crashes" tab and select one of the crashes that did not get symbolicated.

  5. Right-click on it and select "Show in Finder".

  6. Right-click on the revealed .xccrashpoint bundle and select "Show Package Contents".

  7. Drill down into DistributionInfos -> all -> Logs.

  8. Drag any of the .crash files into the left side of the "View Device Logs" pane open in the Devices window.

  9. Wait a second or two for Xcode to symbolicate the crash.

查看更多
时光不老,我们不散
4楼-- · 2019-04-06 00:44

According to the documentation of Xcode 9.0:

The Crashes Organizer symbolicates unsymbolicated logs, if they are selected, using a local .dSYM indexed by Spotlight. (22550064)

You can check out more on this in Xcode's Documentation.

查看更多
狗以群分
5楼-- · 2019-04-06 00:49

I tried to copy symbolicatecrash file from xCode 7.2 and pasted it in xCode 7.3 in the following path:

/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/Current/Resources/

Am using Crasher script to symbolicate the crash reports How to use Crasher

查看更多
做个烂人
6楼-- · 2019-04-06 00:51

The location of symbolicatecrash has changed in Xcode 7.3:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

查看更多
聊天终结者
7楼-- · 2019-04-06 00:52

I do not upload symbols with my application, so the App Store cannot symbolicate for me. I used the following workaround to symbolicate all of the crashlogs that XCode downloads from the store. These instructions are for XCode 8. The paths for the symbolicate crash app will vary from version to version of XCode but the ideas should be the same in each version.

  1. Place your symbols where the symbolicator can find them: Place your symbols (.dsym) file in your Archives directory. You can find this by going to Organizer, context clicking on an archive and choosing "show in finder". Navigate up to the Archives directory (e.g. /Users/USERNAME/Library/Developer/Xcode/Archives) and place your dsym file there. It can be in other locations as well, it's just that I've verified that this one works.
  2. Download the crash logs: In XCode, make sure that you've downloaded the crashlogs for the build you want to symbolicate (Organizer->Crashes, click on your app and then choose the version of your app in the panel to the right of the list of apps).
  3. Locate the crash logs on disk: In the panel that has the App Version and build number, context click on one of the crashes and choose "Show in Finder". Navigate up to the "Crashes Folder" and note this location e.g.: /Users/USERNAME/Library/Developer/Xcode/Products/com.company-name.Your-App/VERSION/Crashes
  4. Setup DEVELOPER_DIR for symbolicatecrash on the command line: Open a terminal window and CD to the crashes directory from step 3 and set the DEVELOPER_DIR like this: cd /Users/USERNAME/Library/Developer/Xcode/Products/com.companyname.Your-App/VERSION/Crashes/ export set DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    (this should be the location of the "Developer" directory inside of your XCode app bundle).
  5. Locate the symbolicatecrash script: symbolicatecrash knows how to find your symbolicate crash logs using the dsym from step 1. Apple moves it around from version to version of xcode. You can find it like this: find /Applications/Xcode.app/ -name symbolicatecrash. In XCode 8, it is in /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash
  6. Backup your crashes folder You may want to backup your crashes folder (/Users/USERNAME/Library/Developer/Xcode/Products/com.companyname.Your-App/VERSION/Crashes/)
  7. Symbolicate all of your crashes: Be sure that you are still in the Crashes directory from step 4 and type
    for i in `find . -type f -name \*.crash`; do cat $i | /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash --output $i.sym; mv $i.sym $i; done;
    This symbolicates each .crash file into an output file and then copies that back over the original, unsymbolicated file.
  8. View Crashes Return to the crashes organizer and view the symbolicated crashes
查看更多
登录 后发表回答