Daniel
Daniel

Reputation: 1263

Crashlytics how to upload dsym files from Carthage frameworks

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://i.sstatic.net/ggVBA.jpg)

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

Upvotes: 3

Views: 2273

Answers (1)

Daniel
Daniel

Reputation: 1263

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 \{\}

Upvotes: 3

Related Questions