Firebase provides services including App Distribution, Authentication, Crashlytics, and Analytics. This guide shows how to register the iOS and Android versions of a Flutter app separately.
๐๏ธ
Unless you have a specific reason to register the apps manually, use the Flutter workflow that registers both platforms together.
Enter the app name and package name.
The original example looks for android.namespace in /android/app/src/build.gradle, or the package attribute in /android/app/src/main/AndroidManifest.xml, with com.example.promleeblog as an example. Use the application ID of the installed build if it differs from the namespace. We'll add the SHA-1 fingerprint later.
Enter the app name and bundle identifier. The bundle ID is the PRODUCT_BUNDLE_IDENTIFIER value in /ios/Runner.xcodeproj/project.pbxproj, for example com.example.promleeblog.
With the project open, select File > Add Package Dependencies.
Adding package dependencies
Enter https://github.com/firebase/firebase-ios-sdk in the search field at the top right. Once the result appears, click Add Package, add FirebaseAnalytics to the Runner target, and click Add Package again.
Finding the Firebase iOS SDK package
Skip the native initialization code in step 4 and finish the wizard. For Flutter, put the initialization code in main.dart.
We registered the Android and iOS versions of a Flutter project separately in Firebase. You can now register your apps in the Firebase console and test them. Next time, we'll look at the Flutter workflow for registering both apps together.