Manual Installation
Notice
This page is archived and might not reflect the latest version of the FlutterFire plugins. You can find the latest information on firebase.google.com:
caution
Manual installation is not the recommended installation flow. These guides are for existing applications using FlutterFire.
In previous versions of FlutterFire, in order to add Firebase to your projects manual platform
specific steps were required, such as downloading a google-services.json
file for Android,
downloading a GoogleService-Info.plist
file for iOS or editing your index.html
file for web.
FlutterFire now supports initialization from Dart using the FlutterFire CLI.
The new Dart-only initialization is fully backwards compatible with previous versions of FlutterFire - if you have an existing project with manual initialization, this will continue to work.
#
Platform setupIf you wish to continue to manually install Firebase on your platforms, please read the following guides:
#
Migrating to Dart-only initializationIf you wish to migrate to the Dart-only initialization flow, some steps are required for your existing applications.
caution
Please backup / branch your code before migrating.
#
Android- Remove the
/android/app/google-services.json
file. - Remove the
google-services
dependency from the/android/build.gradle
file:
- Remove the plugin execution via the
/android/app/build.gradle
file:
#
iOSUsing Xcode, open the project's ios/Runner.xcworkspace
file, then delete the GoogleService-Info.plist
file located in the file browser.
#
macOSUsing Xcode, open the project's macos/Runner.xcworkspace
file, then delete the GoogleService-Info.plist
file located in the file browser.
#
Web- Remove any Firebase SDK scripts from your
web/index.html
file, for example:
- Remove any
firebase.initializeApp()
logic and configuration from theweb/index.html
file:
#
Overriding Firebase SDK VersionsFlutterFire internally sets the versions of the Firebase SDKs that each module uses. Each release is tested against a fixed set of SDK version to ensure everything works as expected.
If you wish to change these versions, you can manually override the native SDK versions
#
AndroidIn the /android/app/build.gradle
file, you can provide your own versions using the options shown below:
#
iOS/macOSOpen your /ios/Podfile
or /macos/Podfile
file and add any of the globals below to the top of the file: