iosswiftcrashlyticsgoogle-fabric

Crashlytics report can be generated only after re run the app


I just implemented Fabric Crashlytics tool to my Xcode project via Swift Package Dependencies.

All works good if I enable Google Analytic on a step when I create an app, without this step I did not received crash reports, so I switched to the app with Google Analytic enabled.

I've tested crash button from the link:

One comment that I don't like from there

"After your app crashes, run it again from Xcode so that your app can send the crash report to Firebase."

Does it mean that user has to reopen app to send crash report? For example if a user download an app from the App Store and then somehow the app is crashed. Does mean that reopening app required for sending that crash? And if the user will not open the app it means I lost this crash report? I understand that on live store there is no option to re run it form Xcode, but reopening seems a require step.

I suppose the crash report should work different a bit by sending issue details right after a crash, I may be wrong here.

Also when I set everything via Swift Package Dependencies looks like I don't have an option to upload dSYM via this option

/path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs

Does this mean I need to pull Fabric and Crashlytics from CocoaPods?

I've switched off bitcode at the moment and looks like all is works automatically but not sure it is good idea for long perspective.


Solution

  • Yes, crashes will be uploaded when restarting the app after it crashes. As far as I know, this is because the SDK may not have enough time to actually send the report when the crash happens.

    If you are using Swift Package Manager, you still have that option. This is the command:

    "${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
    

    If the app has bitcode enabled, then you'll need to download the dSYMs from the App Store and upload them manually.

    Lastly, Fabric is now deprecated so don't download it. You don't need to use Cocoapods if you are already integrated Crashlytics with SPM.