[docs] prettier

This commit is contained in:
Salakar
2019-07-12 15:20:14 +01:00
parent 7e7bcfc51e
commit 50ad72f6aa
79 changed files with 502 additions and 495 deletions

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate AdMob into your Android application.
description: Manually integrate AdMob into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,6 +1,6 @@
---
title: AdMob with Firebase
description: Google AdMob makes it easy for developers to earn money from their mobile apps with high-quality ads.
description: Google AdMob makes it easy for developers to earn money from their mobile apps with high-quality ads.
---
# AdMob with Firebase
@@ -11,7 +11,7 @@ whilst taking advantage of other Firebase service such as Analytics. React Nativ
[Interstitial Ads](https://developers.google.com/admob/android/interstitial?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=admob)
and [Rewarded Video Ads](https://developers.google.com/admob/android/rewarded-video?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=admob).
*We are currently investigating how to integrate with [Native Ads](https://developers.google.com/admob/android/native/start?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=admob).*
_We are currently investigating how to integrate with [Native Ads](https://developers.google.com/admob/android/native/start?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=admob)._
<Youtube id="9qCxo0D-Sak" />

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate AdMob into your iOS application.
description: Manually integrate AdMob into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -19,7 +19,7 @@ yarn add @react-native-firebase/admob
## Module usage
The AdMob package provides a JavaScript API for integrating event based adverts such as Interstitial Ads and
The AdMob package provides a JavaScript API for integrating event based adverts such as Interstitial Ads and
React component view adverts such as Banner Ads.
Import the Cloud Functions package into your project:

View File

@@ -1,16 +1,17 @@
---
title: Android Setup
description: Manually integrate Analytics into your Android application.
description: Manually integrate Analytics into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Analytics to Gradle Settings
**`android/settings.gradle`**:
```groovy
include ':@react-native-firebase_analytics'
project(':@react-native-firebase_analytics').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/analytics/android')
@@ -19,6 +20,7 @@ project(':@react-native-firebase_analytics').projectDir = new File(rootProject.p
#### Add Analytics to App Gradle Dependencies
**`android/app/build.gradle`**:
```groovy{4}
// ..
dependencies {
@@ -29,7 +31,8 @@ dependencies {
#### Add Analytics to Main Android Application:
**`android/app/src/main/java/**/MainApplication.java`**:
**`android/app/src/main/java/**/MainApplication.java`\*\*:
```java{2,8}
// ..
import io.invertase.firebase.analytics.ReactNativeFirebaseAnalyticsPackage;

View File

@@ -5,7 +5,7 @@ description: Google Analytics for Firebase is a free app measurement solution th
# Analytics
The analytics module provides out of the box support with Google Analytics for Firebase.
The analytics module provides out of the box support with Google Analytics for Firebase.
Integration with the Android & iOS allows for in-depth analytical insight reporting, such as
device information, location, user actions and more.
@@ -53,7 +53,7 @@ device information, location, user actions and more.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-analytics)

View File

@@ -1,6 +1,6 @@
---
title: iOS Setup
description: Manually integrate Analytics into your iOS application.
description: Manually integrate Analytics into your iOS application.
---
# iOS Manual Linking
@@ -8,11 +8,12 @@ description: Manually integrate Analytics into your iOS application.
## Manual iOS Integration via CocoaPods
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Analytics Pod
**`ios/Podfile`**:
```ruby{4}
// ..
target 'app' do
@@ -23,7 +24,7 @@ end
## Manual iOS Integration via Frameworks
*TODO*
_TODO_
## Device Identification
@@ -32,6 +33,7 @@ If you would like to enable Firebase Analytics to generate automatic audience me
The way to do this using Cocoapods is to add this to your Podfile (though please use [the most current Pod version](https://cocoapods.org/pods/GoogleIDFASupport) supported by react-native-firebase):
**`ios/Podfile`**:
```ruby{5}
// ..
target 'app' do

View File

@@ -59,8 +59,8 @@ import analytics from '@react-native-firebase/analytics';
async function onSignIn(user) {
await Promise.all([
analytics().setUserId(user.uid),
analytics().setUserProperty('account_balance', user.balance),
analytics().setUserId(user.uid),
analytics().setUserProperty('account_balance', user.balance),
]);
}
```
@@ -68,7 +68,7 @@ async function onSignIn(user) {
### Tracking screen names
Similar to Analytics on the web, it's important to understand the user journey within your application, for example
tracking drop off points during a e-commerce transaction flow. The Analytics package provides a method called
tracking drop off points during a e-commerce transaction flow. The Analytics package provides a method called
`setCurrentScreen` to help track this.
```js
@@ -81,12 +81,12 @@ function BasketScreen() {
// Set & override the MainActivity screen name
await analytics().setCurrentScreen(screen, screen);
}
// Track a screen view once the component has mounted
useEffect(() => {
trackScreenView('BasketScreen');
}, []);
return <View />;
}
```
@@ -96,10 +96,10 @@ function BasketScreen() {
In some cases, resetting all analytics data is required on certain events such as signing out of the application.
To achieve this call the `resetAnalyticsData` method.
```js
import analytics from '@react-native-firebase/analytics';
```js
import analytics from '@react-native-firebase/analytics';
async function onSignOut() {
await analytics().resetAnalyticsData();
}
```
```

View File

@@ -5,7 +5,7 @@ description: Analytics works out of the box, however automatically reserved a nu
# Reserved Events
The Analytics package works out of the box, however a number of events are automatically reported to Firebase.
The Analytics package works out of the box, however a number of events are automatically reported to Firebase.
These event names are called as 'Reserved Events'. Attempting to send any custom event using the `logEvent` method
with any of the following event names will throw an error.

View File

@@ -1,16 +1,17 @@
---
title: Android Initialization
description: Initialization Firebase with Android.
description: Initialization Firebase with Android.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add App to Gradle Settings
**`android/settings.gradle`**:
```groovy
include ':@react-native-firebase_app'
project(':@react-native-firebase_app').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/app/android')
@@ -19,6 +20,7 @@ project(':@react-native-firebase_app').projectDir = new File(rootProject.project
#### Add App to App Gradle Dependencies
**`android/app/build.gradle`**:
```groovy{4}
// ..
dependencies {
@@ -29,7 +31,8 @@ dependencies {
#### Add App to Main Android Application:
**`android/app/src/main/java/**/MainApplication.java`**:
**`android/app/src/main/java/**/MainApplication.java`\*\*:
```java{2,8}
// ..
import io.invertase.firebase.app.ReactNativeFirebaseAppPackage;

View File

@@ -1,11 +1,11 @@
---
title: Client Initialization
description: Initialization Firebase with the client method.
description: Initialization Firebase with the client method.
---
# Client Initialization
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,6 +1,6 @@
---
title: Configure via firebase.json
description: Configure your Firebase services via a `firebase.json` file.
description: Configure your Firebase services via a `firebase.json` file.
---
# React Native Firebase JSON Configuration
@@ -13,7 +13,7 @@ These options are here to replace steps where you'd normally have to make native
## Structure
All options for React Native Firebase must be placed inside a wrapping `react-native` object.
All options for React Native Firebase must be placed inside a wrapping `react-native` object.
**Supported Values**: `boolean`, `string`, `number`
@@ -27,14 +27,14 @@ All options for React Native Firebase must be placed inside a wrapping `react-na
"crashlytics_ndk_enabled": true,
"crashlytics_debug_enabled": true,
"crashlytics_auto_collection_enabled": false,
"ml_natural_language_language_id_model" : true,
"ml_natural_language_smart_reply_model" : false,
"ml_vision_face_model" : true,
"ml_vision_image_label_model" : false,
"ml_vision_object_detection_model" : true,
"ml_natural_language_language_id_model": true,
"ml_natural_language_smart_reply_model": false,
"ml_vision_face_model": true,
"ml_vision_image_label_model": false,
"ml_vision_object_detection_model": true,
"messaging_auto_init_enabled": false
}
}
@@ -44,55 +44,55 @@ All options for React Native Firebase must be placed inside a wrapping `react-na
You may find it useful to use it for non-Firebase things in your project, e.g:
- toggling a feature
- injecting values into your Android manifest
- switching Android source sets
- controlling optional dependencies
- controlling native dependency versions
- customising build time logic
- customising runtime logic
- switching which podspec to use based
- toggling a feature
- injecting values into your Android manifest
- switching Android source sets
- controlling optional dependencies
- controlling native dependency versions
- customising build time logic
- customising runtime logic
- switching which podspec to use based
All config items in a `firebase.json` file can be read at every stage of your app's build/run cycle:
- Android
- Inside Gradle build
- Inside native code (e.g. Java)
- iOS
- Inside Script Phases
- Inside Pod install (e.g. can be read inside pod specs)
- Inside native code (e.g. Objective-C)
- JS
- Inside your app bundle
- RN CLI - Project Config (`react-native.config.js`)
- RN CLI - Dependency Config (`react-native.config.js`)
To help you with this we've documented the internal APIs that are accessible at every location:
#### Android - Runtime (Java)
TODO
#### Android - Build time (Groovy)
TODO
#### iOS - CocoaPods (Ruby)
TODO
#### iOS - Script Phases (Bash)
TODO
#### iOS - Runtime (Objective-C)
TODO
#### RN CLI - Project Config (`react-native.config.js`)
TODO
#### RN CLI - Dependency Config (`react-native.config.js`)
TODO
- Android
- Inside Gradle build
- Inside native code (e.g. Java)
- iOS
- Inside Script Phases
- Inside Pod install (e.g. can be read inside pod specs)
- Inside native code (e.g. Objective-C)
- JS
- Inside your app bundle
- RN CLI - Project Config (`react-native.config.js`)
- RN CLI - Dependency Config (`react-native.config.js`)
To help you with this we've documented the internal APIs that are accessible at every location:
#### Android - Runtime (Java)
TODO
#### Android - Build time (Groovy)
TODO
#### iOS - CocoaPods (Ruby)
TODO
#### iOS - Script Phases (Bash)
TODO
#### iOS - Runtime (Objective-C)
TODO
#### RN CLI - Project Config (`react-native.config.js`)
TODO
#### RN CLI - Dependency Config (`react-native.config.js`)
TODO

View File

@@ -1,6 +1,6 @@
---
title: Firebase App
description: The app module is the core library which integrates React Native with Firebase.
description: The app module is the core library which integrates React Native with Firebase.
---
# App
@@ -43,7 +43,7 @@ app to be installed.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-app)

View File

@@ -1,11 +1,11 @@
---
title: iOS Initialization
description: Initialization Firebase with iOS.
description: Initialization Firebase with iOS.
---
# iOS Initialization
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -22,7 +22,7 @@ React Native Firebase provides two methods for initializing your with Firebase.
#### Native initialization
Native initialization is the preferred way of setting up React Native Firebase. This process involves adding the
Native initialization is the preferred way of setting up React Native Firebase. This process involves adding the
`google-services.json` and `GoogleService-Info.plist` file generated via the Firebase console. The native method
is compatible with all other packages.
@@ -30,10 +30,10 @@ For further platform installation guides, view the <Anchor version group href="/
#### Client initialization
Similar to the [Firebase Web SDK](https://www.npmjs.com/package/firebase), React Native Firebase allows app
initialization via the client using `initializeApp`.
Similar to the [Firebase Web SDK](https://www.npmjs.com/package/firebase), React Native Firebase allows app
initialization via the client using `initializeApp`.
> Due to limitation with some Firebase SDKs, the Remote Config, Crashlytics & Performance Monitoring modules will not work with this method of initialization.
> Due to limitation with some Firebase SDKs, the Remote Config, Crashlytics & Performance Monitoring modules will not work with this method of initialization.
For further information, view the <Anchor version group href="/client-initialization">client initialization</Anchor>
documentation.
@@ -44,13 +44,13 @@ Import the default firebase instance into your project:
```js
import firebase from '@react-native-firebase/app';
```
```
The instance is also accessible from other installed packages, for example:
```js
```js
import auth, { firebase } from '@react-native-firebase/auth';
```
```
### Create and initialize an additional app instance

View File

@@ -1,16 +1,17 @@
---
title: Android Setup
description: Manually integrate Authentication into your Android application.
description: Manually integrate Authentication into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Authentication to Gradle Settings
**`android/settings.gradle`**:
```groovy
include ':@react-native-firebase_auth'
project(':@react-native-firebase_auth').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/auth/android')
@@ -19,6 +20,7 @@ project(':@react-native-firebase_auth').projectDir = new File(rootProject.projec
#### Add Authentication to App Gradle Dependencies
**`android/app/build.gradle`**:
```groovy{4}
// ..
dependencies {
@@ -29,7 +31,8 @@ dependencies {
#### Add Authentication to Main Android Application:
**`android/app/src/main/java/**/MainApplication.java`**:
**`android/app/src/main/java/**/MainApplication.java`\*\*:
```java{2,8}
// ..
import io.invertase.firebase.auth.ReactNativeFirebaseAuthPackage;

View File

@@ -42,7 +42,7 @@ React Native Firebase provides access to all Firebase authentication methods and
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-auth)

View File

@@ -1,6 +1,6 @@
---
title: iOS Setup
description: Manually integrate Authentication into your iOS application.
description: Manually integrate Authentication into your iOS application.
---
# iOS Manual Linking
@@ -8,11 +8,12 @@ description: Manually integrate Authentication into your iOS application.
## Manual iOS Integration via CocoaPods
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Analytics Pod
**`ios/Podfile`**:
```ruby{4}
// ..
target 'app' do
@@ -23,5 +24,4 @@ end
## Manual iOS Integration via Frameworks
*TODO*
_TODO_

View File

@@ -6,16 +6,16 @@ description: React Native Firebase provides integration with Firebase Phone Auth
# Phone Auth
Phone authentication allows users to sign in to Firebase using their phone as the authenticator. An SMS message is sent
to the user via their phone number containing a unique code. Once the code has been authorized, the user is able to
to the user via their phone number containing a unique code. Once the code has been authorized, the user is able to
sign in to Firebase.
> Firebase Phone Auth is not supported in all countries. Please see their [FAQs](https://firebase.google.com/support/faq/#develop) for more information.
> Firebase Phone Auth is not supported in all countries. Please see their [FAQs](https://firebase.google.com/support/faq/#develop) for more information.
React Native Firebase provides two separate integration flows:
- **`signInWithPhoneNumber`**: The recommended flow, provides a straightforward API for authenticating.
- **`verifyPhoneNumber`**: A custom flow, gives full control to the developer to implement. Suitable for custom
authentication flows.
- **`verifyPhoneNumber`**: A custom flow, gives full control to the developer to implement. Suitable for custom
authentication flows.
## signInWithPhoneNumber
@@ -31,7 +31,7 @@ Whilst testing, ensure you [whitelist your device](https://firebase.google.com/d
import auth from '@react-native-firebase/auth';
const { confirm } = await auth().signInWithPhoneNumber('+1 650-555-3434');
```
```
**Step 2**: Confirm code
@@ -44,7 +44,7 @@ try {
} catch (e) {
console.error(e); // Invalid code
}
```
```
**Step 3**: Android automatic verification
@@ -52,7 +52,7 @@ Some Android devices may automatically verify codes received via SMS. If this ha
is triggered, meaning no manual code verification is required.
```js
firebase.auth().onAuthStateChanged((user) => {
firebase.auth().onAuthStateChanged(user => {
if (user) {
// Stop the login flow / Navigate to next page
}
@@ -61,4 +61,4 @@ firebase.auth().onAuthStateChanged((user) => {
## verifyPhoneNumber
*TODO* @ehesp @salakar
_TODO_ @ehesp @salakar

View File

@@ -15,7 +15,6 @@ yarn add @react-native-firebase/auth
> Integrating manually and not via React Native auto-linking? Check the setup instructions for <Anchor version group href="/android">Android</Anchor> & <Anchor version group href="/ios">iOS</Anchor>.
## Module usage
The Authentication package provides a JavaScript API which mimics the Firebase Web SDK.
@@ -46,28 +45,32 @@ function App() {
// Set an initilizing state whilst Firebase connects
const [initilizing, setInitilizing] = useState(true);
const [user, setUser] = useState();
// Handle user state changes
function onAuthStateChanged(user) {
setUser(user);
if (initilizing) setInitilizing(false);
}
useEffect(() => {
const subscriber = auth().onAuthStateChanged(onAuthStateChanged);
return subscriber; // unsubscribe on unmount
}, []);
if (initilizing) return null;
if (!user) {
return (
<View><Text>Login</Text></View>
<View>
<Text>Login</Text>
</View>
);
}
return (
<View><Text>Welcome {user.email}</Text></View>
<View>
<Text>Welcome {user.email}</Text>
</View>
);
}
```
@@ -80,18 +83,17 @@ SDKs, ensuring that a users previous authentication state between app sessions i
The user is able to clear their state by deleting the apps data/cache from the device settings.
### Auth providers
React Native Firebase provides access to the majority of authentication providers available, including social providers
including Facebook, Google, Twitter and Github, along with phone/SMS authentication.
*Our [guides](/guides?tags=auth) provide more in-depth explanations on provides and how to integrate them into your application.*
_Our [guides](/guides?tags=auth) provide more in-depth explanations on provides and how to integrate them into your application._
#### Anonymous Sign In
Some applications don't require authentication, which make it tricky to identify what users are doing throughout your app.
If connecting with external APIs, it is also useful to add an extra layer of security by ensuring the users request is
If connecting with external APIs, it is also useful to add an extra layer of security by ensuring the users request is
from the app. This can be achieved with the `signInAnonymously` method, which creates a new anonymous user which is
persisted, allowing you to integrate with other services such as Analytics by providing a user id.
@@ -117,8 +119,8 @@ async function bootstrap() {
#### Email/Password Sign In
Email/Password sign in is a common method for user sign in on applications. This requires the user to provide
an email address and secure password. Users can both register and sign in in one method called
`createUserWithEmailAndPassword`, or sign in to an existing account with `signInWithEmailAndPassword`.
an email address and secure password. Users can both register and sign in in one method called
`createUserWithEmailAndPassword`, or sign in to an existing account with `signInWithEmailAndPassword`.
Users must first register using the `createUserWithEmailAndPassword` method
and then sign in with the `signInWithEmailAndPassword` method.
@@ -134,4 +136,3 @@ async function register(email, password) {
}
}
```

View File

@@ -5,7 +5,7 @@ description: React Native Firebase integrates with the majority of social auth p
# Social Auth
React Native Firebase provides support for integrating with different social platforms. The authentication with these
React Native Firebase provides support for integrating with different social platforms. The authentication with these
different platforms is left to the developer to implement due to the various implementations and flows possible using their
oAuth APIs.
@@ -18,11 +18,12 @@ library, which provides a wrapper around the native Android & iOS SDKs. The libr
access to the users `AccessToken` which is required to create a Firebase credential.
**Step 1**: Login to Facebook with permissions.
```js
import { LoginManager } from 'react-native-fbsdk';
// Login with permissions
const result = await LoginManager.logInWithReadPermissions(['public_profile', 'email']);
const result = await LoginManager.logInWithReadPermissions(['public_profile', 'email']);
if (result.isCancelled) {
throw new Error('User cancelled the login process');
@@ -57,8 +58,8 @@ await firebase.auth().signInWithCredential(credential);
## Twitter
The [react-native-twitter-signin](https://github.com/GoldenOwlAsia/react-native-twitter-signin) library provides a
wrapper around the official Twitter SDKs, providing access to the users `authToken` and `authTokenSecret` which are
The [react-native-twitter-signin](https://github.com/GoldenOwlAsia/react-native-twitter-signin) library provides a
wrapper around the official Twitter SDKs, providing access to the users `authToken` and `authTokenSecret` which are
required to create a Firebase credential.
**Step 1**: Initialize the Twitter SDK.
@@ -68,13 +69,13 @@ import { NativeModules } from 'react-native';
const { RNTwitterSignIn } = NativeModules;
await RNTwitterSignIn.init('TWITTER_CONSUMER_KEY', 'TWITTER_CONSUMER_SECRET');
```
```
**Step 2**: Login to Twitter and read tokens
```js
// Also returns: name, userID & userName
const { authToken, authTokenSecret } = await RNTwitterSignIn.logIn();
const { authToken, authTokenSecret } = await RNTwitterSignIn.logIn();
```
**Step 3**: Create a Firebase credential with the tokens.
@@ -82,7 +83,7 @@ const { authToken, authTokenSecret } = await RNTwitterSignIn.logIn();
```js
import { firebase } from '@react-native-firebase/auth';
const credential = firebase.auth.TwitterAuthProvider .credential(authToken, authTokenSecret);
const credential = firebase.auth.TwitterAuthProvider.credential(authToken, authTokenSecret);
```
**Step 4**: Sign in to Firebase with the created credential.
@@ -93,7 +94,7 @@ await firebase.auth().signInWithCredential(credential);
## Google
The [react-native-google-signin](https://github.com/react-native-community/react-native-google-signin) provides a
The [react-native-google-signin](https://github.com/react-native-community/react-native-google-signin) provides a
wrapper around the official Google login library, providing access to the users `accessToken` and `idToken` which are
required to create a Firebase credential.
@@ -126,7 +127,7 @@ const { accessToken, idToken } = await GoogleSignin.signIn();
```js
import { firebase } from '@react-native-firebase/auth';
const credential = firebase.auth.GoogleAuthProvider .credential(idToken, accessToken);
const credential = firebase.auth.GoogleAuthProvider.credential(idToken, accessToken);
```
**Step 4**: Sign in to Firebase with the created credential.
@@ -137,8 +138,8 @@ await firebase.auth().signInWithCredential(credential);
## Github
*TODO* @salakar
_TODO_ @salakar
## Custom Provider
*TODO* @salakar
_TODO_ @salakar

View File

@@ -1,16 +1,17 @@
---
title: Android Setup
description: Manually integrate Remote Config into your Android application.
description: Manually integrate Remote Config into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Remote Config to Gradle Settings
**`android/settings.gradle`**:
```groovy
include ':@react-native-firebase_config'
project(':@react-native-firebase_config').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/config/android')
@@ -19,6 +20,7 @@ project(':@react-native-firebase_config').projectDir = new File(rootProject.proj
#### Add Remote Config to App Gradle Dependencies
**`android/app/build.gradle`**:
```groovy{4}
// ..
dependencies {
@@ -29,7 +31,8 @@ dependencies {
#### Add Remote Config to Main Android Application:
**`android/app/src/main/java/**/MainApplication.java`**:
**`android/app/src/main/java/**/MainApplication.java`\*\*:
```java{2,8}
// ..
import io.invertase.firebase.config.ReactNativeFirebaseConfigPackage;

View File

@@ -1,6 +1,6 @@
---
title: Remote Config
description: Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update.
description: Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update.
---
# Remote Config
@@ -8,7 +8,7 @@ description: Firebase Remote Config is a cloud service that lets you change the
React Native Firebase provides native integration with Remote Config, allowing you to change the appearance
and/or functionality of your app without requiring an app update. Remote Config values added into the Firebase
console are accessible via a JavaScript API, giving you full control over when and how these are applied and take
effect within your application.
effect within your application.
<Youtube id="_CXXVFPO6f0" />
@@ -45,7 +45,7 @@ effect within your application.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-config)

View File

@@ -1,6 +1,6 @@
---
title: iOS Setup
description: Manually integrate Remote Config into your iOS application.
description: Manually integrate Remote Config into your iOS application.
---
# iOS Manual Linking
@@ -8,11 +8,12 @@ description: Manually integrate Remote Config into your iOS application.
## Manual iOS Integration via CocoaPods
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Remote Config Pod
**`ios/Podfile`**:
```ruby{4}
// ..
target 'app' do
@@ -23,4 +24,4 @@ end
## Manual iOS Integration via Frameworks
*TODO*
_TODO_

View File

@@ -40,7 +40,7 @@ import config from '@react-native-firebase/config';
async function getValues() {
try {
const activated = await config().fetchAndActivate();
if (activated) {
const experimentalFeatureEnabled = await config().getValue('experiment');
console.log('Experimental source: ', experimentalFeatureEnabled.source);

View File

@@ -1,6 +1,6 @@
---
title: Android Setup
description: Manually integrate Crashlytics into your Android application.
description: Manually integrate Crashlytics into your Android application.
---
# Android Setup
@@ -11,11 +11,12 @@ description: Manually integrate Crashlytics into your Android application.
### Add Fabric Gradle Tools
These steps are required, if you do not add these your app will most likely crash at startup with the following Error: *"The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account."*
These steps are required, if you do not add these your app will most likely crash at startup with the following Error: _"The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account."_
#### Add the Fabric Maven repository
#### Add the Fabric Maven repository
**`android/build.gradle`**:
**`android/build.gradle`**:
```groovy{6-8}
// ..
buildscript {
@@ -32,7 +33,8 @@ buildscript {
#### Add the Fabric Tools Plugin dependency
**`android/build.gradle`**:
**`android/build.gradle`**:
```groovy{6}
// ..
buildscript {
@@ -47,8 +49,8 @@ buildscript {
#### Apply the Fabric Tools Plugin to your app
**`android/app/build.gradle`**:
**`android/app/build.gradle`**:
```groovy{2}
apply plugin: 'com.android.application' // apply after this line
apply plugin: 'io.fabric'
@@ -59,9 +61,10 @@ apply plugin: 'io.fabric'
> OPTIONAL
Crashlytics NDK reporting allows you to capture Native Development Kit crashes, e.g. in React Native this will capture crashes originating from the Yoga layout engine.
Crashlytics NDK reporting allows you to capture Native Development Kit crashes, e.g. in React Native this will capture crashes originating from the Yoga layout engine.
**`android/app/build.gradle`**:
**`android/app/build.gradle`**:
```groovy{4-6}
// ..
apply plugin: 'io.fabric'
@@ -74,7 +77,6 @@ crashlytics {
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
TODO

View File

@@ -1,6 +1,6 @@
---
title: Crashlytics
description: Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality.
description: Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality.
---
# Crashlytics
@@ -8,7 +8,7 @@ description: Firebase Crashlytics is a lightweight, realtime crash reporter that
Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality.
React Native Firebase provides automatic crash reporting for both native and JavaScript errors, including unhandled promise rejections.
The JavaScript API also allows for full custom crash reporting and supports sending additional attributes to help debug crashes within your
application.
application.
<Youtube id="k_mdNRZzd30" />
@@ -46,7 +46,7 @@ application.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-crashlytics)

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate Crashlytics into your iOS application.
description: Manually integrate Crashlytics into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -20,7 +20,7 @@ yarn add @react-native-firebase/crashlytics
The Crashlytics package will automatically report on any fatal application crash. Both native and JavaScript
crashes along with unhandled promise rejections are captured with full stack traces.
The package provides a JavaScript API to create your own crash reports and/or send additional information
The package provides a JavaScript API to create your own crash reports and/or send additional information
with crash reports to the Firebase console for a better debugging experience.
Once installed, import the Crashlytics package into your project:
@@ -37,7 +37,7 @@ import { firebase } from '@react-native-firebase/crashlytics';
### Testing crashes
The Crashlytics package provides a `crash` method which is provided to ensure crash reports are correctly
The Crashlytics package provides a `crash` method which is provided to ensure crash reports are correctly
being sent to the Firebase console and can be used with your own test suite. Any `log` methods called before
sending a crash report and sent with the crash report.
@@ -47,7 +47,7 @@ import crashlytics from '@react-native-firebase/crashlytics';
function forceCrash() {
crashlytics.log('Testing crash');
crashlytics.crash();
}
}
```
### Handling non-fatal crashes
@@ -57,21 +57,17 @@ where an error occurs but is caught by your own code as a bailout method. To
send a stack trace, pass a [JavaScript Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)
to the `recordError` method.
```js
import crashlytics from '@react-native-firebase/crashlytics';
```js
import crashlytics from '@react-native-firebase/crashlytics';
function sendReport() {
crashlytics().recordError(
new Error(
'Error with a stack trace'
)
);
crashlytics().recordError(new Error('Error with a stack trace'));
}
```
```
### Additional crash attributes
It is possible to provide additional attributes which are sent with crash reports. This helps with debugging and
It is possible to provide additional attributes which are sent with crash reports. This helps with debugging and
localising the error. To set additional attributes call the `set*` methods.
```js
@@ -84,7 +80,7 @@ async function onSignIn(user) {
crashlytics().setUserEmail(user.email),
crashlytics().setAttribute('credits', user.credits),
]);
crashlytics.crash();
}
```

View File

@@ -1,16 +1,17 @@
---
title: Android Setup
description: Manually integrate Realtime Database into your Android application.
description: Manually integrate Realtime Database into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Realtime Database to Gradle Settings
**`android/settings.gradle`**:
```groovy
include ':@react-native-firebase_database'
project(':@react-native-firebase_database').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/database/android')
@@ -19,6 +20,7 @@ project(':@react-native-firebase_database').projectDir = new File(rootProject.pr
#### Add Realtime Database to App Gradle Dependencies
**`android/app/build.gradle`**:
```groovy{4}
// ..
dependencies {
@@ -29,7 +31,8 @@ dependencies {
#### Add Realtime Database to Main Android Application:
**`android/app/src/main/java/**/MainApplication.java`**:
**`android/app/src/main/java/**/MainApplication.java`\*\*:
```java{2,8}
// ..
import io.invertase.firebase.database.ReactNativeFirebaseDatabasePackage;

View File

@@ -1,13 +1,13 @@
---
title: Realtime Database
description: Store and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and remains available when your app goes offline.
description: Store and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and remains available when your app goes offline.
---
# Realtime Database
The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to
every connected client. React Native Firebase provides native integration with the Android & iOS Firebase SDKs, supporting
both realtime data sync and offline capabilities.
The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to
every connected client. React Native Firebase provides native integration with the Android & iOS Firebase SDKs, supporting
both realtime data sync and offline capabilities.
<Youtube id="U5aeM5dvUpA" />
@@ -35,7 +35,7 @@ both realtime data sync and offline capabilities.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-database)

View File

@@ -1,6 +1,6 @@
---
title: iOS Setup
description: Manually integrate Realtime Database into your iOS application.
description: Manually integrate Realtime Database into your iOS application.
---
# iOS Manual Linking
@@ -8,11 +8,12 @@ description: Manually integrate Realtime Database into your iOS application.
## Manual iOS Integration via CocoaPods
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Realtime Database Pod
**`ios/Podfile`**:
```ruby{4}
// ..
target 'app' do
@@ -23,5 +24,4 @@ end
## Manual iOS Integration via Frameworks
*TODO*
_TODO_

View File

@@ -41,16 +41,16 @@ import database from '@react-native-firebase/database';
async function onSignIn() {
// Get the users ID
const uid = auth().currentUser.uid;
// Create a reference
const ref = database().ref(`/users/${uid}`);
// Fetch the data snapshot
const snapshot = await ref.once('value');
console.log('User data: ', snapshot.val());
}
```
```
To write data to the database, the created `Reference` exposes the `set` method which overwrites the data at the given
data reference:
@@ -62,17 +62,17 @@ import database from '@react-native-firebase/database';
async function onCreateAccount() {
// Get the users ID
const uid = auth().currentUser.uid;
// Create a reference
const ref = database().ref(`/users/${uid}`);
await ref.set({
uid,
name: 'Joe Bloggs',
role: 'admin',
});
}
```
```
### Realtime Data Sync
@@ -88,40 +88,40 @@ import database from '@react-native-firebase/database';
function Role({ uid }) {
const [initilizing, setInitilizing] = useState(true);
const [role, setRole] = useState(null);
// Subscriber handler
function onRoleChange(snapshot) {
// Set the role from the snapshot
setRole(snapshot.val());
// Connection established
if (initilizing) setInitilizing(false);
}
useEffect(() => {
// Create reference
const ref = database().ref(`/users/${uid}/role`);
// Subscribe to value changes
ref(`/users/${uid}/role`).on('value', onRoleChange);
// Unsubscribe from changes on unmount
return () => ref.off('value', onRoleChange);
}, [uid]);
// Wait for first connection
if (initilizing) return null;
return <Text>{role}</Text>;
}
```
### FlatList and lists of data
In applications it is common to list repeating data rather than a single value, for example listing a scrollable view of
In applications it is common to list repeating data rather than a single value, for example listing a scrollable view of
games which the user can select and navigate to. If a snapshot value is an array, the snapshot provides `forEach` method
to ensure the data can be displayed in-order as it appears on the database, as the standard `val` method does not
guarantee order.
to ensure the data can be displayed in-order as it appears on the database, as the standard `val` method does not
guarantee order.
Combining the result with a React Native [`FlatList`](https://facebook.github.io/react-native/docs/flatlist) makes creating
a performant, scrollable list simple:
@@ -138,15 +138,15 @@ function Games() {
// Handle snapshot response
function onSnapshot(snapshot) {
const list = [];
// Create our own array of games in order
snapshot.forEach((game) => {
snapshot.forEach(game => {
list.push({
key: game.id, // Add custom key for FlatList usage
...game,
});
});
setGames(list);
setLoading(false);
}
@@ -156,17 +156,12 @@ function Games() {
const ref = database().ref(`/games`);
ref.once('value', onSnapshot);
}, [uid]);
if (loading) {
return <Text>Loading games...</Text>;
}
return (
<FlatList
data={games}
renderItem={({item}) => <Text>{item.name}</Text>}
/>
);
return <FlatList data={games} renderItem={({ item }) => <Text>{item.name}</Text>} />;
}
```

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Firebase In-App Messaging into your Android application.
description: Manually integrate Firebase In-App Messaging into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -35,7 +35,7 @@ messages that encourage them to use key app features. React Native Firebase prov
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-fiam)

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrateFirebase In-App Messaging into your iOS application.
description: Manually integrateFirebase In-App Messaging into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -17,9 +17,9 @@ yarn add @react-native-firebase/fiam
## Module usage
Once installed, any published campaigns from the [Firebase console](https://console.firebase.google.com/?utm_source=invertase&utm_medium=fiam&utm_campaign=quick_start)
Once installed, any published campaigns from the [Firebase console](https://console.firebase.google.com/?utm_source=invertase&utm_medium=fiam&utm_campaign=quick_start)
are automatically handled and displayed on your users device. The module provides a JavaScript API to allow greater
control of the displaying of these messages.
control of the displaying of these messages.
Once installed, import the FIAM package into your project:
@@ -35,10 +35,10 @@ import { firebase } from '@react-native-firebase/fiam';
### Suppressing messages
The Firebase console campaign manager provides a few events to handle when messages are displayed to users. In some
The Firebase console campaign manager provides a few events to handle when messages are displayed to users. In some
situations you may want to handle this manually to only display messages at a chosen time, for example once a user
has completed an on-boarding process within your app. The `setMessagesDisplaySuppressed` method can be used to
achieve this.
has completed an on-boarding process within your app. The `setMessagesDisplaySuppressed` method can be used to
achieve this.
> The suppressed state is not persisted between restarts, so ensure it is called as early as possible.
@@ -51,7 +51,7 @@ async function bootstrap() {
async function onSetup(user) {
await setupUser(user);
// Allow user to receive messages now setup is complete
// Allow user to receive messages now setup is complete
fiam().setMessagesDisplaySuppressed(false);
}
```

View File

@@ -6,7 +6,7 @@ description: Cloud Firestore is a scalable NoSQL cloud database to store and syn
# Cloud Firestore
Cloud Firestore is a NoSQL cloud database to store and sync data between your React Native application
and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs
and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs
performance and offline capabilities.
<Youtube id="QcsAb2RR52c" />
@@ -45,7 +45,7 @@ performance and offline capabilities.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-firestore)

View File

@@ -22,5 +22,3 @@ TODO
## Reacts lifecycle
TODO

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Cloud Functions into your Android application.
description: Manually integrate Cloud Functions into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,12 +1,12 @@
---
title: Cloud Functions
description: Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.
description: Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.
---
# Cloud Functions
Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.
React Native Firebase supports integration with production and locally emulated Cloud Functions with a simple API interface.
React Native Firebase supports integration with production and locally emulated Cloud Functions with a simple API interface.
<Youtube id="vr0Gfvp5v1A" />
@@ -54,7 +54,7 @@ React Native Firebase supports integration with production and locally emulated
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-functions)

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate Cloud Functions into your iOS application.
description: Manually integrate Cloud Functions into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -42,7 +42,7 @@ async function order() {
id: '12345678',
size: 'large',
});
if (success) {
console.log('Pizza is on the way!');
} else {
@@ -58,7 +58,7 @@ Looking for a more in-depth explanations? Our [Cloud Functions](/guides?tags=fun
### Local emulator
Cloud Functions can be emulated to run locally, or using your own custom domain. To switch the
Cloud Functions can be emulated to run locally, or using your own custom domain. To switch the
emulator location, use the `useFunctionsEmulator` method:
```js
@@ -71,7 +71,7 @@ if (__DEV__) {
### Cloud Functions Region
Cloud functions can be deployed to multiple regions across the globe. To change the region,
Cloud functions can be deployed to multiple regions across the globe. To change the region,
initialize the functions instance with the region (note the default region is us-central1):
```js

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Instance ID into your Android application.
description: Manually integrate Instance ID into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,11 +1,11 @@
---
title: Instance ID
description: Firebase Instance ID provides a unique identifier for each app instance and a mechanism to authenticate and authorize actions.
description: Firebase Instance ID provides a unique identifier for each app instance and a mechanism to authenticate and authorize actions.
---
# Instance ID
Instance ID provides a simple API to generate security tokens that authorize third parties to access
Instance ID provides a simple API to generate security tokens that authorize third parties to access
your app's server side managed resources, for example sending FCM messages.
## Getting Started
@@ -40,7 +40,7 @@ your app's server side managed resources, for example sending FCM messages.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-iid)

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate Instance ID into your iOS application.
description: Manually integrate Instance ID into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,47 +1,47 @@
---
title: v6
description: React Native Firebase version 6.x.x module index
description: React Native Firebase version 6.x.x module index
---
# Version 6.x.x
## Supported Versions
React Native Firebase requires the following platform versions:
React Native Firebase requires the following platform versions:
| Platform | Minimum Version |
|--------------------------------------------------------------|----------------------------|
| React Native | {{ versions.reactnative }} |
| Android API | {{ versions.android }} |
| iOS | {{ versions.ios }} |
| Platform | Minimum Version |
| ------------ | -------------------------- |
| React Native | {{ versions.reactnative }} |
| Android API | {{ versions.android }} |
| iOS | {{ versions.ios }} |
## Firebase Modules
Each Firebase module is published as it's own package on [NPM](https://www.npmjs.com/) can be
individually installed using [`Yarn`](https://yarnpkg.com/lang/en/). Please refer to the quick start guide
for installation instructions on each individual module page.
> The main package that you interface with is <Anchor version href="/app">App</Anchor> (`@react-native-firebase/app`)
| Module | Downloads | Coverage |
|------------------------------------------------------|-----------------------------------------------------------------------|------------------------------------------------|
| <Anchor href="/admob">AdMob</Anchor> | <Badge type="downloads">@react-native-firebase/admob</Badge> | <Badge type="coverage">admob</Badge> |
| <Anchor href="/analytics">Analytics</Anchor> | <Badge type="downloads">@react-native-firebase/analytics</Badge> | <Badge type="coverage">analytics</Badge> |
| <Anchor href="/app">App</Anchor> | <Badge type="downloads">@react-native-firebase/app</Badge> | <Badge type="coverage">app</Badge> |
| <Anchor href="/indexing">App Indexing</Anchor> | <Badge type="downloads">@react-native-firebase/indexing</Badge> | <Badge type="coverage">indexing</Badge> |
| <Anchor href="/invites">App Invites</Anchor> | <Badge type="downloads">@react-native-firebase/invites</Badge> | <Badge type="coverage">invites</Badge> |
| <Anchor href="/auth">Authentication</Anchor> | <Badge type="downloads">@react-native-firebase/auth</Badge> | <Badge type="coverage">auth</Badge> |
| <Anchor href="/firestore">Cloud Firestore</Anchor> | <Badge type="downloads">@react-native-firebase/firestore</Badge> | <Badge type="coverage">firestore</Badge> |
| <Anchor href="/functions">Cloud Functions</Anchor> | <Badge type="downloads">@react-native-firebase/functions</Badge> | <Badge type="coverage">functions</Badge> |
| <Anchor href="/messaging">Cloud Messaging</Anchor> | <Badge type="downloads">@react-native-firebase/messaging</Badge> | <Badge type="coverage">messaging</Badge> |
| <Anchor href="/storage">Cloud Storage</Anchor> | <Badge type="downloads">@react-native-firebase/storage</Badge> | <Badge type="coverage">storage</Badge> |
| <Anchor href="/crashlytics">Crashlytics</Anchor> | <Badge type="downloads">@react-native-firebase/crashlytics</Badge> | <Badge type="coverage">crashlytics</Badge> |
| <Anchor href="/links">Dynamic Links</Anchor> | <Badge type="downloads">@react-native-firebase/links</Badge> | <Badge type="coverage">links</Badge> |
| <Anchor href="/fiam">In-app Messaging</Anchor> | <Badge type="downloads">@react-native-firebase/fiam</Badge> | <Badge type="coverage">fiam</Badge> |
| <Anchor href="/iid">Instance ID</Anchor> | <Badge type="downloads">@react-native-firebase/iid</Badge> | <Badge type="coverage">iid</Badge> |
| <Anchor href="/mlkit">ML Kit</Anchor> | <Badge type="downloads">@react-native-firebase/mlkit</Badge> | <Badge type="coverage">mlkit</Badge> |
| <Anchor href="/notifications">Notifications</Anchor> | <Badge type="downloads">@react-native-firebase/notifications</Badge> | <Badge type="coverage">notifications</Badge> |
| <Anchor href="/perf">Performance Monitoring</Anchor> | <Badge type="downloads">@react-native-firebase/perf</Badge> | <Badge type="coverage">perf</Badge> |
| <Anchor href="/database">Realtime Database</Anchor> | <Badge type="downloads">@react-native-firebase/database</Badge> | <Badge type="coverage">database</Badge> |
| <Anchor href="/config">Remote Config</Anchor> | <Badge type="downloads">@react-native-firebase/config</Badge> | <Badge type="coverage">config</Badge> |
| <Anchor href="/utils">Utils</Anchor> | <Badge type="downloads">@react-native-firebase/utils</Badge> | <Badge type="coverage">utils</Badge> |
| Module | Downloads | Coverage |
| ---------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------- |
| <Anchor href="/admob">AdMob</Anchor> | <Badge type="downloads">@react-native-firebase/admob</Badge> | <Badge type="coverage">admob</Badge> |
| <Anchor href="/analytics">Analytics</Anchor> | <Badge type="downloads">@react-native-firebase/analytics</Badge> | <Badge type="coverage">analytics</Badge> |
| <Anchor href="/app">App</Anchor> | <Badge type="downloads">@react-native-firebase/app</Badge> | <Badge type="coverage">app</Badge> |
| <Anchor href="/indexing">App Indexing</Anchor> | <Badge type="downloads">@react-native-firebase/indexing</Badge> | <Badge type="coverage">indexing</Badge> |
| <Anchor href="/invites">App Invites</Anchor> | <Badge type="downloads">@react-native-firebase/invites</Badge> | <Badge type="coverage">invites</Badge> |
| <Anchor href="/auth">Authentication</Anchor> | <Badge type="downloads">@react-native-firebase/auth</Badge> | <Badge type="coverage">auth</Badge> |
| <Anchor href="/firestore">Cloud Firestore</Anchor> | <Badge type="downloads">@react-native-firebase/firestore</Badge> | <Badge type="coverage">firestore</Badge> |
| <Anchor href="/functions">Cloud Functions</Anchor> | <Badge type="downloads">@react-native-firebase/functions</Badge> | <Badge type="coverage">functions</Badge> |
| <Anchor href="/messaging">Cloud Messaging</Anchor> | <Badge type="downloads">@react-native-firebase/messaging</Badge> | <Badge type="coverage">messaging</Badge> |
| <Anchor href="/storage">Cloud Storage</Anchor> | <Badge type="downloads">@react-native-firebase/storage</Badge> | <Badge type="coverage">storage</Badge> |
| <Anchor href="/crashlytics">Crashlytics</Anchor> | <Badge type="downloads">@react-native-firebase/crashlytics</Badge> | <Badge type="coverage">crashlytics</Badge> |
| <Anchor href="/links">Dynamic Links</Anchor> | <Badge type="downloads">@react-native-firebase/links</Badge> | <Badge type="coverage">links</Badge> |
| <Anchor href="/fiam">In-app Messaging</Anchor> | <Badge type="downloads">@react-native-firebase/fiam</Badge> | <Badge type="coverage">fiam</Badge> |
| <Anchor href="/iid">Instance ID</Anchor> | <Badge type="downloads">@react-native-firebase/iid</Badge> | <Badge type="coverage">iid</Badge> |
| <Anchor href="/mlkit">ML Kit</Anchor> | <Badge type="downloads">@react-native-firebase/mlkit</Badge> | <Badge type="coverage">mlkit</Badge> |
| <Anchor href="/notifications">Notifications</Anchor> | <Badge type="downloads">@react-native-firebase/notifications</Badge> | <Badge type="coverage">notifications</Badge> |
| <Anchor href="/perf">Performance Monitoring</Anchor> | <Badge type="downloads">@react-native-firebase/perf</Badge> | <Badge type="coverage">perf</Badge> |
| <Anchor href="/database">Realtime Database</Anchor> | <Badge type="downloads">@react-native-firebase/database</Badge> | <Badge type="coverage">database</Badge> |
| <Anchor href="/config">Remote Config</Anchor> | <Badge type="downloads">@react-native-firebase/config</Badge> | <Badge type="coverage">config</Badge> |
| <Anchor href="/utils">Utils</Anchor> | <Badge type="downloads">@react-native-firebase/utils</Badge> | <Badge type="coverage">utils</Badge> |

View File

@@ -12,6 +12,7 @@ To set this up, add a new `intent-filter` to your manifest file. The example bel
to handle URLs from any `https://invertase.io/blog` URL.
`android/app/src/main/AndroidManifest.xml`:
```xml
<manifest ...>
<application android:name="com.your.app.MainApplication"

View File

@@ -6,11 +6,11 @@ description: Firebase App Indexing gets your app into Google Search.
# App Indexing
Firebase App Indexing gets your app into Google Search. If users have your app installed, they can launch your app and
go directly to the content they're searching for. App Indexing reengages your app users by helping them find both public
go directly to the content they're searching for. App Indexing reengages your app users by helping them find both public
and personal content right on their device, even offering query autocompletions to help them more quickly find what they
need. If users dont yet have your app, relevant queries trigger an install card for your app in Search results.
React Native Firebase provides functionality to handle events such as users opening the application via a URL which
React Native Firebase provides functionality to handle events such as users opening the application via a URL which
has been indexed by Firebase.
<Youtube id="C35OSHlTNwA" />
@@ -38,7 +38,7 @@ has been indexed by Firebase.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-indexing)

View File

@@ -37,14 +37,8 @@ After navigating to the URL Types section of your Xcode workspace you can now ad
#### Configure the new URL Type
1. Input the `Identifier` value; The Identifier is normally the same as your Bundle Identifier which is usually the reverse of the domain for your app e.g. com.mycompany.app.
2. Input the `URL Schemes` value - this can be a comma delimited list of values; For example if you set this to myapp,foobar then your app will then accept urls from myapp://* and foobar://*.
2. Input the `URL Schemes` value - this can be a comma delimited list of values; For example if you set this to myapp,foobar then your app will then accept urls from myapp://_ and foobar://_.
`Icon` and `Role` can be left to use the defaults unless you need to change these.
![Example](https://prismic-io.s3.amazonaws.com/invertase%2F5d66eb78-883f-4f87-b390-adcee22bbff0_configure-item.png)

View File

@@ -57,20 +57,20 @@ open. Once the app has loaded, the `getInitialURL()` method can be called to det
by an app indexed URL. If your application was not opened via an app indexed URL, the value will be `null`.
Note: All URLs which trigger the app to open will be passed to this method, therefore it is important to check
the domain of the URL to check it has come from an indexed source.
the domain of the URL to check it has come from an indexed source.
```js
import indexing from '@react-native-firebase/indexing';
async function bootstrapApp() {
const url = await indexing.getInitialURL();
if (url && url.startsWith('https://invertase.io')) {
if (url === 'https://invertase.io/offers') {
// Handle the URL, e.g. using a react-navigation custom service:
NavigationService.navigate('OffersScreen', { from: 'indexing' });
}
}
const url = await indexing.getInitialURL();
if (url && url.startsWith('https://invertase.io')) {
if (url === 'https://invertase.io/offers') {
// Handle the URL, e.g. using a react-navigation custom service:
NavigationService.navigate('OffersScreen', { from: 'indexing' });
}
}
}
```
@@ -89,20 +89,19 @@ import indexing from '@react-native-firebase/indexing';
function App({ navigation }) {
// Listen to open URL events once ready
useEffect(() => {
const unsubscribe = indexing().onOpenURL((url) => {
const unsubscribe = indexing().onOpenURL(url => {
if (url.startsWith('https://invertase.io')) {
if (url === 'https://invertase.io/offers') {
// Handle the URL, e.g. using the react-navigation navigation prop:
// Handle the URL, e.g. using the react-navigation navigation prop:
navigation.navigate('OffersScreen', { from: 'indexing' });
}
}
});
// Return the function to unsubscribe from
return unsubscribe;
}, []);
return <NavigationStack />;
}
```

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Invites into your Android application.
description: Manually integrate Invites into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,6 +1,6 @@
---
title: Invites
description: Firebase Invites are an out-of-the-box solution for app referrals and sharing via email or SMS.
description: Firebase Invites are an out-of-the-box solution for app referrals and sharing via email or SMS.
---
# Invites
@@ -8,7 +8,7 @@ description: Firebase Invites are an out-of-the-box solution for app referrals a
> Firebase Invites is deprecated. On January 24th, 2020, support will be discontinued for Firebase Invites. Learn how to migrate to <Anchor href="/migrate-to-dynamic-links">Dynamic Links</Anchor> with a customs sharing solution.
React Native Firebase provides native integration of Firebase Invites, allowing you to build your own invitations
to send to friends with a JavaScript API. Send simple or rich HTML emails to users, and then build a custom invite
to send to friends with a JavaScript API. Send simple or rich HTML emails to users, and then build a custom invite
handler directly within your React Native app.
<Youtube id="LkaIJCZ_HyM" />
@@ -44,7 +44,7 @@ handler directly within your React Native app.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-invites)

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate Invites into your iOS application.
description: Manually integrate Invites into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -10,5 +10,3 @@ invites backend service will start returning error responses when making calls t
learn more about this, see the [Firebase documentation](https://firebase.google.com/docs/invites/deprecation).
## TODO

View File

@@ -52,12 +52,12 @@ function App() {
const deeplink = invite.deeplink;
Alert.alert('Invitation received', `ID: ${invite.invitationId}`);
}
useEffect(() => {
const subscriber = invites().onInvitation(handleInvitation);
return subscriber();
});
return <HomeScreen />;
}
```
@@ -74,7 +74,7 @@ import invites from '@react-native-firebase/invites';
async function bootstrap() {
const invite = await invites().getInitialInvitation();
// Check if an invite has been opened
if (invite) onInitialInvite(invite);
}
@@ -88,7 +88,7 @@ function onInitialInvite(invite) {
### Sending an invite
To send an invite, it must first be built using `createInvitation` and then sent using `sendInvitation`. The
To send an invite, it must first be built using `createInvitation` and then sent using `sendInvitation`. The
`createInvitation` returns an instance of a `InviteBuilder` which can be used to enhance your invitation with additional
contents such as HTML content, a Google Analytics tracking ID and a custom email subject and more.
@@ -98,16 +98,18 @@ To view all available invite properties, view the <Anchor href="/reference/invit
import invites from '@react-native-firebase/invites';
async function createAndSendInvite(user) {
const invite = invites().createInvitation('Join my app', `Hey ${user.name}, join my app with me and share content!`);
const invite = invites().createInvitation(
'Join my app',
`Hey ${user.name}, join my app with me and share content!`,
);
// Set additional invite content
invite
.setCallToActionText('Join my app!')
.setDeepLink(`app:/invite?name=${user.uid}`)
// Set Android specific content
.android
.setGoogleAnalyticsTrackingId('UA-12345')
.setCallToActionText('Join my app!')
.setDeepLink(`app:/invite?name=${user.uid}`)
// Set Android specific content
.android.setGoogleAnalyticsTrackingId('UA-12345')
.setEmailSubject(`${user.name}, join my app!`);
try {
const id = await invites().sendInvitation(invite);
console.log(`Invite created with the ID:`, id);

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Messaging into your Android application.
description: Manually integrate Messaging into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,16 +1,16 @@
---
title: Dynamic Links
description: Firebase Dynamic Links are links that work the way you want, whether or not your app is already installed.
description: Firebase Dynamic Links are links that work the way you want, whether or not your app is already installed.
---
# Dynamic Links
React Native Firebase provides native integration Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a
React Native Firebase provides native integration Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a
cost free service, allowing for server-device and device-device communication. The React Native Firebase Messaging
module provides a simple JavaScript API to interact with FCM.
The Messaging module is only responsible for handling data-only messages. To learn how to display notifications to
users, view the <Anchor group="notifications" href="/">Notifications</Anchor> module.
users, view the <Anchor group="notifications" href="/">Notifications</Anchor> module.
<Youtube id="sioEY4tWmLI" />
@@ -47,7 +47,7 @@ users, view the <Anchor group="notifications" href="/">Notifications</Anchor> mo
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-messaging)

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate Messaging into your iOS application.
description: Manually integrate Messaging into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Messaging into your Android application.
description: Manually integrate Messaging into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,16 +1,16 @@
---
title: Firebase Cloud Messaging (FCM)
description: Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
description: Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
---
# Firebase Cloud Messaging
React Native Firebase provides native integration of Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a
React Native Firebase provides native integration of Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a
cost free service, allowing for server-device and device-device communication. The React Native Firebase Messaging
module provides a simple JavaScript API to interact with FCM.
The Messaging module is only responsible for handling data-only messages. To learn how to display notifications to
users, view the <Anchor group="notifications" href="/">Notifications</Anchor> module.
users, view the <Anchor group="notifications" href="/">Notifications</Anchor> module.
<Youtube id="sioEY4tWmLI" />
@@ -47,7 +47,7 @@ users, view the <Anchor group="notifications" href="/">Notifications</Anchor> mo
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-messaging)

View File

@@ -39,12 +39,12 @@ Add any of the keys indicated below to your JSON file and set them to `true` to
```json5
{
"react-native": {
'react-native': {
// Language Identification
"ml_natural_language_language_id_model": false,
ml_natural_language_language_id_model: false,
// Smart Replies
"ml_natural_language_smart_reply_model": false
}
ml_natural_language_smart_reply_model: false,
},
}
```

View File

@@ -12,10 +12,10 @@ Firebase ML Kit brings the power of machine learning vision to your React Native
ML Kit Vision for React Native currently supports the following Firebase APIs:
- [Text Recognition](https://firebase.google.com/docs/ml-kit/recognize-text)
- [X] Cloud
- [x] Cloud
- [x] On Device
- [Document Text Recognition](https://firebase.google.com/docs/ml-kit/recognize-text)
- [X] Cloud
- [x] Cloud
- [Face Detection](https://firebase.google.com/docs/ml-kit/detect-faces)
- [x] On Device
- [Barcode Detection](https://firebase.google.com/docs/ml-kit/read-barcodes)
@@ -24,7 +24,7 @@ ML Kit Vision for React Native currently supports the following Firebase APIs:
- [x] Cloud
- [x] On Device
- [Landmark Recognition](https://firebase.google.com/docs/ml-kit/recognize-landmarks)
- [X] Cloud
- [x] Cloud
The following APIs are **unsupported**, with support coming in a future release;
@@ -32,7 +32,6 @@ The following APIs are **unsupported**, with support coming in a future release;
- Object detection & tracking
- Image Labeling with a custom model
## Getting Started
<Grid>

View File

@@ -39,19 +39,19 @@ Add any of the keys indicated below to your JSON file and set them to `true` to
```json5
{
"react-native": {
'react-native': {
// on device face detection
"ml_vision_face_model" : true,
ml_vision_face_model: true,
// on device text recognition
"ml_vision_ocr_model" : true,
ml_vision_ocr_model: true,
// on device barcode detection
"ml_vision_barcode_model" : true,
ml_vision_barcode_model: true,
// on device image labelling
// TODO: merge these options into one
"ml_vision_label_model": true,
"ml_vision_image_label_model": true,
}
ml_vision_label_model: true,
ml_vision_image_label_model: true,
},
}
```

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Notifications into your Android application.
description: Manually integrate Notifications into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,6 +1,6 @@
---
title: Notifications
description: TODO
description: TODO
---
# Notifications
@@ -39,7 +39,7 @@ TODO
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-notifications)

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate Notifications into your iOS application.
description: Manually integrate Notifications into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Performance Monitoring into your Android application.
description: Manually integrate Performance Monitoring into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,12 +1,12 @@
---
title: Performance Monitoring
description: Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS and Android apps.
description: Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS and Android apps.
---
# Performance Monitoring
React Native Firebase provides native integration with Performance Monitoring to gain insight into
key performance characteristics within your React Native application. The library works out of the box,
React Native Firebase provides native integration with Performance Monitoring to gain insight into
key performance characteristics within your React Native application. The library works out of the box,
however provides a simple API to track custom trace and HTTP request metrics.
<Youtube id="0EHSPFvH7vk" />
@@ -44,7 +44,7 @@ however provides a simple API to track custom trace and HTTP request metrics.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-perf)

View File

@@ -1,6 +1,6 @@
---
title: iOS Setup
description: Manually integrate Performance Monitoring into your iOS application.
description: Manually integrate Performance Monitoring into your iOS application.
---
# iOS Manual Linking
@@ -8,11 +8,12 @@ description: Manually integrate Performance Monitoring into your iOS application
## Manual iOS Integration via CocoaPods
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Performance Monitoring Pod
**`ios/Podfile`**:
```ruby{4}
// ..
target 'app' do
@@ -23,4 +24,4 @@ end
## Manual iOS Integration via Frameworks
*TODO*
_TODO_

View File

@@ -37,52 +37,52 @@ import { firebase } from '@react-native-firebase/perf';
### Custom Tracing
Defining a custom trace provides greater insight into actions a user may carry out with your application.
Defining a custom trace provides greater insight into actions a user may carry out with your application.
```js
```js
import perf from '@react-native-firebase/perf';
async function customTrace() {
// Define & start a trace
const trace = await perf().startTrace('custom_trace');
// Define trace meta details
trace.putAttribute('user', 'abcd');
trace.putAttribute('user', 'abcd');
trace.putMetric('credits', 30);
// Stop the trace
await trace.stop();
}
```
```
### HTTP Request Tracing
Performance Monitoring provides an API to trace HTTP network requests.
```js
```js
import perf from '@react-native-firebase/perf';
async function getRequest(url) {
// Define the network metric
const metric = await perf().newHttpMetric(url, 'GET');
// Define meta details
metric.putAttribute('user', 'abcd');
metric.putAttribute('user', 'abcd');
// Perform a HTTP request and provide response information
const response = await fetch(url);
metric.setHttpResponseCode(response.status);
metric.setResponseContentType(response.headers.get('Content-Type'));
metric.setResponsePayloadSize(response.headers.get('Content-Length'));
// Stop the trace
await metric.stop();
return response.json();
}
// Call API
getRequest('https://api.com').then((json) => {
getRequest('https://api.com').then(json => {
console.log(json);
});
```
```

View File

@@ -2,260 +2,260 @@
group: AdMob
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Initialization
to: "/android"
to: '/android'
- text: iOS Initialization
to: "/ios"
to: '/ios'
- module: analytics
group: Analytics
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- text: Reserved Events
to: "/reserved-events"
to: '/reserved-events'
- module: auth
group: Authentication
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- text: Social Auth
to: "/social-auth"
to: '/social-auth'
- text: Phone Auth
to: "/phone-auth"
to: '/phone-auth'
- module: firestore
group: Cloud Firestore
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: functions
group: Cloud Functions
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: messaging
group: Cloud Messaging
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: storage
group: Cloud Storage
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: app
group: App
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Initialization
to: "/android"
to: '/android'
- text: iOS Initialization
to: "/ios"
to: '/ios'
- text: Client Initialization
to: "/client"
to: '/client'
- module: crashlytics
group: Crashlytics
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: database
group: Realtime Database
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: links
group: Dynamic Links
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: fiam
group: In-App Messaging
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: indexing
group: App Indexing
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: iid
group: Instance ID
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: invites
group: Invites
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- text: Migrate to Dynamic Links
to: "/migrate-to-dynamic-links"
to: '/migrate-to-dynamic-links'
- module: ml-natural-language
group: ML Kit Natural Language
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: ml-vision
group: ML Kit Vision
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: notifications
group: Notifications
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: config
group: Remote Config
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: perf
group: Performance Monitoring
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'
- module: utils
group: Utils
children:
- text: Overview
to: "/"
to: '/'
- text: Quick Start
to: "/quick-start"
to: '/quick-start'
- text: Android Setup
to: "/android"
to: '/android'
- text: iOS Setup
to: "/ios"
to: '/ios'

View File

@@ -1,16 +1,17 @@
---
title: Android Setup
description: Manually integrate Cloud Storage into your Android application.
description: Manually integrate Cloud Storage into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Cloud Storage to Gradle Settings
**`android/settings.gradle`**:
```groovy
include ':@react-native-firebase_storage'
project(':@react-native-firebase_storage').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/storage/android')
@@ -19,6 +20,7 @@ project(':@react-native-firebase_storage').projectDir = new File(rootProject.pro
#### Add Cloud Storage to App Gradle Dependencies
**`android/app/build.gradle`**:
```groovy{4}
// ..
dependencies {
@@ -30,6 +32,7 @@ dependencies {
#### Add Cloud Storage to Main Android Application:
**android/app/src/main/java/\*\*/MainApplication.java**:
```java{2,8}
// ..
import io.invertase.firebase.storage.ReactNativeFirebaseStoragePackage;

View File

@@ -1,12 +1,12 @@
---
title: Cloud Storage
description: Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale
description: Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale
---
# Cloud Storage
React Native Firebase provides native integration with Cloud Storage, providing support to upload and download files
directly from your device and from your Firebase Cloud Storage bucket.
directly from your device and from your Firebase Cloud Storage bucket.
<Youtube id="_tyjqozrEPY" />
@@ -42,7 +42,7 @@ directly from your device and from your Firebase Cloud Storage bucket.
## Learn more
Our documentation is a great place to start, however if you're looking for more help or want to help others,
Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:
- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-storage)

View File

@@ -1,6 +1,6 @@
---
title: iOS Setup
description: Manually integrate Cloud Storage into your iOS application.
description: Manually integrate Cloud Storage into your iOS application.
---
# iOS Manual Linking
@@ -8,11 +8,12 @@ description: Manually integrate Cloud Storage into your iOS application.
## Manual iOS Integration via CocoaPods
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
#### Add Cloud Storage Pod
**`ios/Podfile`**:
```ruby{4}
// ..
target 'app' do
@@ -23,4 +24,4 @@ end
## Manual iOS Integration via Frameworks
*TODO*
_TODO_

View File

@@ -1,11 +1,11 @@
---
title: Android Setup
description: Manually integrate Utils into your Android application.
description: Manually integrate Utils into your Android application.
---
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -1,12 +1,12 @@
---
title: Utils
description: The Utils package provides public access to internal methods to aide with development
description: The Utils package provides public access to internal methods to aide with development
---
# Utils
The Utils package provides a public JavaScript interface to internal functionality that has been created as part of the
development of the React Native Firebase library.
development of the React Native Firebase library.
## Getting Started

View File

@@ -1,11 +1,11 @@
---
title: iOS Setup
description: Manually integrate Utils into your iOS application.
description: Manually integrate Utils into your iOS application.
---
# iOS Manual Linking
> The following steps are only required if your environment does not have access to React Native
auto-linking.
> auto-linking.
## TODO

View File

@@ -32,11 +32,11 @@ import { firebase } from '@react-native-firebase/utils';
### Detect whether the app is running within TestL Lab
Firebase [TestLab](https://firebase.google.com/docs/test-lab/?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=utils)
is a cloud-based app-testing infrastructure. With one operation, you can test your Android or iOS app across
a wide variety of devices and device configurations, and see the results—including logs, videos,
and screenshots—in the Firebase console.
is a cloud-based app-testing infrastructure. With one operation, you can test your Android or iOS app across
a wide variety of devices and device configurations, and see the results—including logs, videos,
and screenshots—in the Firebase console.
It is useful to change the apps configuration if it is being run in Test Lab, for example disabling Analytics
It is useful to change the apps configuration if it is being run in Test Lab, for example disabling Analytics
data collection. Such functionality can be carried out by taking advantage of the `isRunningInTestLab` property:
```js
@@ -46,8 +46,6 @@ import analytics from '@react-native-firebase/analytics';
async function bootstrap() {
if (utils().isRunningInTestLab) {
await analytics().setAnalyticsCollectionEnabled(false);
}
}
}
```