Question

It has been a while since I used symbolicate in XCode and it used to work. Today when I tried this...

  1. Archive my app.
  2. Install the app on my device from XCode. (Just connect the device and run the app in release mode).
  3. Stopped the app from Xcode.
  4. Ran the app on my device (which is connected to the Mac) which of course crashed.
  5. Now when I open Organizer and go to Device logs, it shows a new crash log file.
  6. But it fails to symbolicate the symbols of my app. All Apple library stuff are symbolicated fine.

I searched all over the net, nothing seems to work.

Edit: In the Build Settings if I disable "Strip Debug Symbol During Copy" even for release build, everything works fine. But Xcode should have been able to symbolicate using the dSYM file I guess. I do not want to distribute the app with debug symbols.

Thanks in advance.

Was it helpful?

Solution

This article will help finding where the problem is: http://support.hockeyapp.net/kb/how-tos-faq/how-to-solve-symbolication-problems

Since you say you run in release mode, the version running on the device is NOT the one that you archived! So if there is a release build already available in the DerivedData directory, it will take that. Otherwise it will create a new build and install that one.

Now there are two possibilities why symbolication doesn't work:

  1. You are doing another release build later on, so the previous build and dSYM get overwritten (see explanation in the link above)
  2. Spotlight doesn't find the dSYM and app binary with the UUID written in the crash report (see explanation in the link above to verify that)

Update: Note regarding stripping symbols: when you don't strip the symbols as mentioned in your edited post, the symbolication is done on the device already. But of course you will be missing the line numbers.

OTHER TIPS

Upon following the link given by Kerni in the above solution, I found that it was spotlight which was not able to find the dSYM file using UUID of the crash log file.

Running following command...

mdimport .

... in the product folder (the one where MyApp1.app and myApp.app.dSYM are located) the problem was resolved.

I am not sure why I have to run it every time I build my application, my mac is not doing it automatically for some reason. But it works.

I have installed Xcode on a directory with white spaces. I fixed it by removing the white spaces of the directory and run xcode-select. (mdimport didnt work for me)

    sudo xcode-select -switch <myxcodedir>

I had the same problem.

In the projects Build Settings in Xcode, under DEBUG_INFORMATION_FORMAT, set DWARF with dSYM File for the Debug configuration. Xcode defaults it to just DWARF.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top