1

In order to enable Crashlytics for my Flutter app (with 3 flavors) i would like to know how the repeating upload of the symbols for the iOS project can be done when i configured Firebase in dart-only mode (i.e. i didn't have to download the GoogleService-Info-plist files for my 3 flavors)?

I've read that i could enter scripts for the upload in XCode under Targets Runner --> Build Phases

...but i wonder how i could differentiate between my 3 flavors, i.e what upload scripts are called if i e.g. build for staging environment? Also it would be interesting to know if those symbol uploads would happen as well when i build/run the app in my Flutter IDE (IntelliJ).

valley
  • 157
  • 1
  • 13

1 Answers1

0

When using Crashlytics with Flutter, the Crashlytics SDK is integrated using CocoaPods. Because of this, this would be the run script you should be using for your app:

"${PODS_ROOT}/FirebaseCrashlytics/run"

In this case, the script will try to locate the configured GoogleSErvices-Info.plist. However, you can pass the app ID as argument and in that case, the plist file is no longer required.

"${PODS_ROOT}/FirebaseCrashlytics/run" --app-id <your app ID>

You can find the app ID in your Firebase project settings.

I'm not sure how your project is configured, but you would need to run this command for your flavors or targets.

Lastly, when building the app, I believe that Flutter will invoke the Xcode builder, which should execute the run script too.

Gerardo
  • 3,460
  • 1
  • 16
  • 18