FirebaseCore expo-firebase-core
provides access to the Firebase configuration and performs initialisation
of the native Firebase App.
Platform Compatibility Android Device Android Emulator iOS Device iOS Simulator Web
No explicit calls to expo-firebase-core
are required to initialize Firebase. This library will auto-initialize the Firebase app when a valid configuration exists.
At the moment, only Firebase Analytics is supported natively. We are working on bringing more native Firebase packages to Expo, stay tuned :)
import * as FirebaseCore from 'expo-firebase-core' ;
Name of the default Firebase app (e.g. [DEFAULT]
).
On the Expo client a Firebase App is created for each project that is loaded, and a unique name for each project is returned.
Firebase options with which the default app was initialized. If no Google services configuration was provided, undefined
is returned.
Depending on the platform, the options are read from the following files and app.json
keys.
Platform File App.json key iOS GoogleService-Info.plist
ios.googleServicesFile
Android google-services.json
android.googleServicesFile
Web web.config.firebase
console . log ( FirebaseCore . DEFAULT_APP_OPTIONS ) ;
The default Firebase options as defined in web.config.firebase
in app.json
.
This constant is useful when you want to use the Firebase JS SDK on native.