This example app requires your own Firebase configuration files to enable Firebase Auth (and related Firebase services) on Android and iOS.
Platform | File | Destination path (relative to example/ ) |
---|---|---|
Android | google-services.json |
android/app/google-services.json |
iOS | GoogleService-Info.plist |
ios/Runner/GoogleService-Info.plist |
Notes:
- Create a Firebase project (or select an existing one) in the Firebase console.
- Add an iOS app and an Android app to the project using this example app's bundle identifiers:
- Android package name: check
example/android/app/src/main/AndroidManifest.xml
package
value. - iOS bundle identifier: open
example/ios/Runner.xcodeproj
in Xcode and check the Runner target Bundle Identifier.
- Android package name: check
- Download the config files from the setup flow and place them in the paths above.
Replace the app SDK key in main.dart with your actual app SDK key (Can be obtained from the manager).
flutter pub get
flutter run
On iOS, if you run into CocoaPods issues after adding the plist, run:
cd ios && pod install && cd -
- "Default FirebaseApp is not initialized" or similar: the config file is missing or placed in the wrong path.