diff --git a/docs/core/app.md b/docs/core/app.md index 886edc9c..a4ba0f8d 100644 --- a/docs/core/app.md +++ b/docs/core/app.md @@ -1,21 +1,21 @@ -# App - firebase.app(): FirebaseApp +## Apps -RNFirebase supports both initializing apps natively and also via js code over the RN bridge. +?> For the **default** app see: [Default App](/core/default-app) -Apps initialized natively are available immediately at app runtime, there is no need to call `initializeApp` for them. +?> For initializing **additional apps** natively and also via js code over the RN bridge see: [Dynamically Initializing Apps](/core/initialize-apps) -For example, to access the default app initialized via the `Google-Services` `plist` or `json` file: +### Reading App Options + +!> `.options.clientId` is not available on the **Android Firebase SDK** so will return null for Android, see the issue: [firebase/firebase-ios-sdk#140 (comment)](https://github.com/firebase/firebase-ios-sdk/issues/140#issuecomment-315953708) + +Just like the Firebase web sdk you can view options used to initialize an app instance in the same way, for example: ```js import firebase from 'react-native-firebase'; const defaultApp = firebase.app(); -defaultApp.database().ref('foobar').once('value', (snapshot) => { - // snapshot from default app -}); - -// get the default app name/options that were initialized natively +// get the default app name/options that the app initialized with console.log("name", defaultApp.name); console.log("apiKey", defaultApp.options.apiKey); console.log("applicationId", defaultApp.options.applicationId); @@ -26,9 +26,3 @@ console.log("storageBucket", defaultApp.options.projectId); ``` - - - - - - diff --git a/docs/core/firebase.md b/docs/core/firebase.md index c203c11f..74ddc24c 100644 --- a/docs/core/firebase.md +++ b/docs/core/firebase.md @@ -1,9 +1,10 @@ # Firebase - - - - - - - +TODO Reference Docs: + +- apps(): Array +- app(): FirebaseApp +- initializeApp(): FirebaseApp +- setLogLevel() +- SDK_VERSION: String +- googleApiAvailability: Object diff --git a/docs/index.html b/docs/index.html index 6f68d6c6..01fcfb85 100644 --- a/docs/index.html +++ b/docs/index.html @@ -45,11 +45,11 @@ ], } - + + + + +