Search code examples
iosxcodedebug-symbolssymbolicate

How to disable desymbolication in Xcode?


I know it's not recommended but for some reason, trying to figure out a way so I could disable desymbolication in xcode.

is there a way we could disable desymbolication in Xcode so that crash report has all details in plain text and does not need to be symbolicate?


Solution

  • The point of compiling our code is to translate source code into a very efficient executable. You do not want to (and can not) encumber every install with all of the symbols, just for the sake of an occasional crash. The fact that the crash reports in the Xcode “Organizer” can be automatically symbolicated for us, without encumbering the app, itself, is ideal: You have an efficient executable, but the Xcode “Organizer” will symbolicate with full diagnostic crash info for us. So, in short, no, you can not (and would not want to) have the actual app include all these symbols.


    If you are looking for simple symbolication workflow, you can add the necessary “Debug Information Format” and then distribute the app via TestFlight on the App Store and then observe the crashes in Xcode’s “Organizer” window:

    1. Specify build setting “Debug Information Format” of “DWARF with dSYM File”:

      Debug Information Format

    2. For demonstration purposes, write code that will crash:

      code that will crash

    3. Build an “archive” (“Product” » “Archive”) and upload to TestFlight. For demonstration purposes, I uploaded as “TestFlight Internal Only”:

      TestFlight Internal Only

    4. Install app on device via TestFlight app on device:

      TestFlight install

    5. Run app and let it crash. When prompted, choose to “Share” with the developer:

      crash

    6. Wait a few minutes, and the symbolicated crash will appear in your Xcode “Organizer” window:

      symbolicated crash log

    The above looks like it takes a lot of work, but it actually requires less effort than it took for me to prepare this answer. (Lol.) FWIW, the above was using Xcode 16.0.

    The process is very similar if using Firebase Crashlytics: Once you do all the standard Firebase integration, you also need to add a “Run Script” in your project’s ”Build Phases“, but otherwise the process is very similar: Configure the “Debug Information Format” for your project, build the archive, and then distribute to users.