开发者

Symbolicate adhoc iphone app crashes

开发者 https://www.devze.com 2022-12-28 02:26 出处:网络
I can\'t manage to make my code symbolicated ... I read the part \"below\" : Given a crash report, the matching

I can't manage to make my code symbolicated ... I read the part "below" :

Given a crash report, the matching binary, and its .dSYM file, symbolication is relatively easy. The Xcode Organizer window has a tab for crash reports of the currently selected device. You can view externally received crash reports in this tab - just place them in the appropriate directory. This is the same as the Mac OS X directory described in the first section. It doesn't matter which device you have tethered, but the directory in which you place the crash report must be the directory for the tethered and selected device.

It is not necessary to place the binary and .dSYM file in a开发者_如何学JAVAny particular location. Xcode uses Spotlight and the UUID to locate the correct files. It is necessary, though, that both files be in the same directory and that this directory is one that is indexed by Spotlight. Anywhere in your home directory should be fine.

But it doesn't work for me ... here is what I did :

  • I opened xcode organizer and I had my iphone device with crash logs
  • App and dsym files are in my xcode project which is on my desktop

All the rest should be automatic, right ? but crash logs aren't symbolicated yet ...

Any comments welcome.

Cheers.

Gotye.


I've been struggling with this for several days and finally figured it out. I wasn't able to get symbolicated logs from any Archived application I installed to my phone. For me, it was a problem with the build settings, although I did notice that it was able to symbolicate logs from some older builds as well after I followed these steps. YMMV may vary with crash logs from older builds. I was able to get symbolicated logs after following these steps in Xcode 4.0.1 on iOS 4.3.1.

In the Xcode Project navigator, click on your project and then click Build Settings. When you archive your application, Xcode uses the Release configuration by default. You'll want to set the following values for the Release configuration only, so you'll have to expand any settings that aren't already expanded to allow you to set it on a per-configuration basis.

Ensure these values are set for the Release configuration:

  • Generate Debug Symbols: Yes
  • Debug Information Format: DWARF with dSYM File
  • Deployment Postprocessing: Yes
  • Strip Linked Product: Yes
  • Use Separate Strip: Yes
  • Strip Debug Symbols During Copy: No
  • Strip Style: All Symbols

Once those are set, Archive and reinstall your application. New crash reports generated from the resulting archive should be symbolicated correctly. For me, many old crash reports also symbolicated correctly after following these steps although I'm not sure how accurate the results would be if the builds were very different.

For reference, I figured all this out after studying this page: https://web.archive.org/web/20110727155234/http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html

I also found this page, which is handy if you're trying to figure out what a particular build setting does: https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html


In order to symbolicate your crash report, try this approach:

(a) Locate the symbolicator (/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash)

(b) Open Terminal and drag this file (so that the path gets copied correctly)

(c) Run a command like /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatorcrash .crash .app (mention the whole path of the crash report and the app file)

(d) Symbolicated crash report will show up


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. atos -arch armv7 -o '(your .app file name here)'/'(.dSYM filename here)' (memory location in the crash report where the crash occured). The memory location should be the one at which the app crashed as per the report.

Ex : atos -arch armv7 -o 'app name.app'/'app name' 0x0003b508

This would show you the exact line, method name which resulted in crash.

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消