Paulius Vindzigelskis
Paulius Vindzigelskis

Reputation: 2181

New Fabric Crashlytics setup with multiple configurations iOS, no dSYM

I have one target and two configurations (Lite and Standard). Both configs have separate bundle IDs and App IDs. In Fabric dashboard, created one project with two iOS apps - one config each (also tried separate projects with same results)

As per Fabric documentation, using these lines to setup:

    let fileName:String
    if AppData.isLiteVersion
    {
        fileName = "GoogleService-Info-Lite"
    } else {
        fileName = "GoogleService-Info"
    }

    let filePath = Bundle.main.path(forResource: fileName, ofType: "plist")


    guard let fileopts = FirebaseOptions(contentsOfFile: filePath!)
        else { assert(false, "Couldn't load config file"); return}

    FirebaseApp.configure(options: fileopts)

Lite configuration is receiving bunch of warnings in console like

Analytics requires Google App ID from GoogleService-Info.plist. Your data may be lost. Google App ID has been changed. Original, new ID:

It looks like crashes are being sent to server, but Lite configuration is not receiving symbols (dSYM). Lite configuration was duplicated from Standard, so all build settings are identical except bundleID and display name

This guy at Fabric Crashlytics multiple environments for iOS app seem had found solution, but it only works with old Fabric as it mentions info.plist entries which does not exist in new Fabric. Any ideas how to fix this in new Fabric?

Also, ./Fabric.framework/run <your_api_key_here> does not work saying

error: Fabric: Configuration Issue

Fabric API key not valid. Your Fabric run script build phase should  contain your API key:
./Fabric.framework/run INSERT_YOUR_API_KEY INSERT_YOUR_BUILD_SECRET

but I don't know where to get this SECRET from new Fabric

Using (from Cocoapods): Fabric (1.9.0), Crashlytics (3.12.0), Firebase (5.15.0)

Upvotes: 2

Views: 1024

Answers (1)

Paulius Vindzigelskis
Paulius Vindzigelskis

Reputation: 2181

I have finally found a solution. The problem was, default dSYM uploader used GoogleService-Info.plist file which it cannot find so was showing unable to find GoogleService-Info.plist in app bundle, dSYMs will not be uploaded. in Build console.

So just added new run script in Build Phases

"${PODS_ROOT}/Fabric/upload-symbols" -gsp "${PROJECT_DIR}/{SUBFOLDERS}/{SPECIFIC_GOOGLE_SERVICE_INFO_FILE}.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

Refer https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?authuser=0

Upvotes: 2

Related Questions