Ad

Crashlytics How To Upload Dsym Files From Carthage Frameworks

- 1 answer

Following the instruction from here https://docs.fabric.io/apple/crashlytics/advanced-setup.html in order to automatically upload dSYM file to fabric you just have to run Fabric.framework/run script on the app target.

My project configuration is as follow:

Project F
- product is Dynamic Framework

Project A
- product is .app
- depends_on:
    - Project F
    - X.framework from Carthage

On the target of Project A i've added, as build phase, to run the Fabric.framework/run script. Somewhere in Project F I forced a crash and observed the call stack in Crashlytics. The call stack displays Project F but the symbol say (Missing) (see https://imgur.com/a/HDubV)

If I make an archive with all the dSYMs and added manually to crashlytics, the symbols from Project F are shown.

How can I upload the generated dSYMs automatically to Crashlytics? Can I use a restful api?

note: I assume the same behaviour will happen for dynamic frameworks imported with Carthage as well.

ENABLE_BITCODE = NO

Output Product Directory
- Debug-iphoneos
    - App.app
        - Frameworks
            - ProjectF.framework
            - X.framework
    - App.app.dSYM
    - ProjectF.framework.dSYM
    - X.framework.dSYM

If you link in other static or dynamic frameworks, you could see crash reports with missing line numbers or file information. This information comes from your dSYM files, so ensure that your dSYM files for the frameworks are placed in the same directory as the app’s dSYM and that they are built before your .app. - Crashlytics Static or Dynamic Frameworks

As you can see in Output Product Directory above, the dSYMs are in the same place, and they appear in the folder before App.app.dSYM

Ad

Answer

Thanks @MikeBonnell

Found the documentation for upload-symbols script https://docs.fabric.io/apple/crashlytics/missing-dsyms.html

Since I'm using in an iOS app (and using Cocoapods) I updated my build phase as follows

find ${DWARF_DSYM_FOLDER_PATH} -name "*.dSYM" | xargs -I \{\} ${PODS_ROOT}/Fabric/upload-symbols -a <api-key> -p ios \{\}
Ad
source: stackoverflow.com
Ad