├── .gitignore
├── docs
├── reference.md
├── iid
│ ├── ios.md
│ ├── android.md
│ └── reference
│ │ └── iid.md
├── analytics
│ ├── ios.md
│ ├── android.md
│ ├── reserved-events.md
│ └── reference
│ │ └── analytics.md
├── notifications
│ ├── reference
│ │ ├── AndroidLights.md
│ │ ├── AndroidProgress.md
│ │ ├── IOSAttachment.md
│ │ ├── AndroidVisibility.md
│ │ ├── NotificationOpen.md
│ │ ├── AndroidChannelGroup.md
│ │ ├── Schedule.md
│ │ ├── AndroidBadgeIconType.md
│ │ ├── IOSAttachmentOptions.md
│ │ ├── AndroidDefaults.md
│ │ ├── AndroidImportance.md
│ │ ├── AndroidPriority.md
│ │ ├── IOSNotifications.md
│ │ ├── AndroidGroupAlert.md
│ │ ├── AndroidSemanticAction.md
│ │ ├── AndroidCategory.md
│ │ ├── AndroidNotifications.md
│ │ ├── AndroidRemoteInput.md
│ │ ├── Notification.md
│ │ └── AndroidAction.md
│ ├── scheduling-notifications.md
│ ├── android-channels.md
│ ├── ios.md
│ ├── displaying-notifications.md
│ └── introduction.md
├── admob
│ ├── ios.md
│ ├── reference
│ │ ├── VideoOptions.md
│ │ ├── Interstitial.md
│ │ ├── RewardedVideo.md
│ │ ├── AdRequest.md
│ │ ├── admob.md
│ │ └── Banner.md
│ ├── android.md
│ ├── error-handling.md
│ └── sizes.md
├── release-notes.md
├── storage
│ ├── ios.md
│ ├── reference
│ │ └── StorageTask.md
│ └── android.md
├── config
│ ├── ios.md
│ ├── example.md
│ └── android.md
├── database
│ ├── ios.md
│ ├── reference
│ │ ├── ServerValue.md
│ │ └── database.md
│ └── android.md
├── functions
│ ├── ios.md
│ ├── android.md
│ └── reference
│ │ ├── HttpsError.md
│ │ └── functions.md
├── perf-mon
│ ├── ios.md
│ ├── android.md
│ └── reference
│ │ ├── perf-mon.md
│ │ ├── HttpMetric.md
│ │ └── Trace.md
├── _search.yaml
├── faqs.md
├── invites
│ ├── reference
│ │ ├── InvitationOpen.md
│ │ ├── Invites.md
│ │ ├── AndroidInvitation.md
│ │ └── Invitation.md
│ ├── android.md
│ └── ios.md
├── auth
│ ├── reference
│ │ ├── AuthCredential.md
│ │ ├── OAuthCredential.md
│ │ ├── AdditionalUserInfo.md
│ │ ├── UserMetadata.md
│ │ ├── GithubAuthProvider.md
│ │ ├── FacebookAuthProvider.md
│ │ ├── ConfirmationResult.md
│ │ ├── OAuthProvider.md
│ │ ├── PhoneAuthProvider.md
│ │ ├── TwitterAuthProvider.md
│ │ ├── GoogleAuthProvider.md
│ │ ├── UserInfo.md
│ │ ├── UserCredential.md
│ │ ├── ActionCodeInfo.md
│ │ ├── IdTokenResult.md
│ │ ├── EmailAuthProvider.md
│ │ ├── ActionCodeSettings.md
│ │ ├── Error.md
│ │ └── AuthSettings.md
│ ├── android.md
│ └── ios.md
├── firestore
│ ├── reference
│ │ ├── MetadataChanges.md
│ │ ├── SetOptions.md
│ │ ├── GeoPoint.md
│ │ ├── FieldPath.md
│ │ ├── SnapshotMetadata.md
│ │ ├── DocumentChange.md
│ │ ├── FieldValue.md
│ │ ├── DocumentSnapshot.md
│ │ ├── SnapshotError.md
│ │ ├── Settings.md
│ │ ├── QuerySnapshot.md
│ │ ├── Blob.md
│ │ ├── FirestoreError.md
│ │ ├── Transaction.md
│ │ ├── WriteBatch.md
│ │ └── firestore.md
│ ├── ios.md
│ └── android.md
├── messaging
│ ├── reference
│ │ ├── IOSMessaging.md
│ │ └── RemoteMessage.md
│ ├── ios.md
│ ├── upstream-messages.md
│ ├── device-token.md
│ ├── topics.md
│ └── android.md
├── links
│ ├── reference
│ │ ├── NavigationParameters.md
│ │ ├── SocialParameters.md
│ │ ├── ITunesParameters.md
│ │ ├── AndroidParameters.md
│ │ ├── AnalyticsParameters.md
│ │ ├── DynamicLink.md
│ │ └── IOSParameters.md
│ └── android.md
├── installation
│ ├── javascript.md
│ └── basic-kit.md
├── core
│ ├── reference
│ │ ├── App.md
│ │ └── core.md
│ ├── default-app.md
│ └── initialize-apps.md
├── _config.yaml
├── crashlytics
│ ├── manual-initialization.md
│ ├── ios.md
│ ├── android.md
│ └── reference
│ │ └── crashlytics.md
├── troubleshooting
│ └── ios.md
├── releases
│ └── v5.1.1.md
└── about.md
├── ios-logo.png
├── android-logo.png
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 |
--------------------------------------------------------------------------------
/docs/reference.md:
--------------------------------------------------------------------------------
1 | # Storage
2 |
3 |
--------------------------------------------------------------------------------
/ios-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OliverGarwil/stackQ/HEAD/ios-logo.png
--------------------------------------------------------------------------------
/android-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OliverGarwil/stackQ/HEAD/android-logo.png
--------------------------------------------------------------------------------
/docs/iid/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | Ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | That is it, Instance ID doesn't need anything else to work.
6 |
--------------------------------------------------------------------------------
/docs/analytics/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | Ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | That is it, Analytics doesn't need anything else to work.
6 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidLights.md:
--------------------------------------------------------------------------------
1 | # AndroidLights
2 |
3 | ## Properties
4 |
5 | ### argb
6 | [method]argb returns number;[/method]
7 |
8 | ### offMs
9 | [method]offMs returns number;[/method]
10 |
11 | ### onMs
12 | [method]onMs returns number;[/method]
13 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidProgress.md:
--------------------------------------------------------------------------------
1 | # AndroidProgress
2 |
3 | ## Properties
4 |
5 | ### indeterminate
6 | [method]indeterminate returns boolean;[/method]
7 |
8 | ### max
9 | [method]max returns number;[/method]
10 |
11 | ### progress
12 | [method]progress returns number;[/method]
--------------------------------------------------------------------------------
/docs/admob/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/AdMob', '~> {{ ios.firebase.ads }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
--------------------------------------------------------------------------------
/docs/release-notes.md:
--------------------------------------------------------------------------------
1 | ## Latest Version
2 |
3 | The latest version is `v5.2.1`;
4 |
5 | [➡️ View the Release Notes](/docs/v5.x.x/releases/v5.2.0)
6 |
7 | ## Older Versions
8 |
9 | - [v5.1.1](/docs/v5.x.x/releases/v5.1.1)
10 | - [v5.1.0](/docs/v5.x.x/releases/v5.1.0)
11 | - [v5.0.0](/docs/v5.x.x/releases/v5.0.0)
12 |
--------------------------------------------------------------------------------
/docs/storage/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/Storage', '~> {{ ios.firebase.storage }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
--------------------------------------------------------------------------------
/docs/config/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/RemoteConfig', '~> {{ ios.firebase.config }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
--------------------------------------------------------------------------------
/docs/database/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/Database', '~> {{ ios.firebase.database }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
--------------------------------------------------------------------------------
/docs/functions/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/Functions', '~> {{ ios.firebase.functions }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
--------------------------------------------------------------------------------
/docs/perf-mon/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/Performance', '~> {{ ios.firebase.perf }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
--------------------------------------------------------------------------------
/docs/_search.yaml:
--------------------------------------------------------------------------------
1 | - module: crash
2 | methods:
3 | - setCrashCollectionEnabled
4 | - isCrashCollectionEnabled
5 | - log
6 | - logcat
7 | - report
8 |
9 | - module: perf
10 | methods:
11 | - setPerformanceCollectionEnabled
12 | - newTrace
13 | classes:
14 | Trace:
15 | - start
16 | - incrementCounter
17 | - stop
18 |
--------------------------------------------------------------------------------
/docs/faqs.md:
--------------------------------------------------------------------------------
1 | # Frequently Asked Questions
2 |
3 | ## Usage with Expo
4 |
5 | React Native Firebase relies heavily on the Firebase native SDKs which means that due to restrictions within Expo, there is no way to use React Native Firebase without ejecting your Expo app.
6 |
7 | TODO: Working Expo + RNFirebase link
8 |
9 | ## Should I use Redux with the Realtime Database / Cloud Firestore?
10 |
11 | TODO
12 |
--------------------------------------------------------------------------------
/docs/invites/reference/InvitationOpen.md:
--------------------------------------------------------------------------------
1 | # InvitationOpen
2 |
3 | Object giving information about the invitation that was opened.
4 |
5 | ## Properties
6 |
7 | ### deepLink
8 | [method]deepLink returns string;[/method]
9 |
10 | The deepLink that should be opened within the application.
11 |
12 | ### invitationId
13 | [method]invitationId returns string;[/method]
14 |
15 | The ID of the invitation that was opened.
16 |
--------------------------------------------------------------------------------
/docs/auth/reference/AuthCredential.md:
--------------------------------------------------------------------------------
1 | # AuthCredential
2 |
3 | Interface that represents the credentials returned by an auth provider. Implementations specify the details about each auth provider's credential requirements.
4 |
5 | ## Properties
6 |
7 | ### providerId
8 | [method]providerId returns string;[/method]
9 |
10 | The authentication provider ID for the credential. For example, 'facebook.com', or 'google.com'.
11 |
--------------------------------------------------------------------------------
/docs/auth/reference/OAuthCredential.md:
--------------------------------------------------------------------------------
1 | # OAuthCredential
2 |
3 | Interface that represents the OAuth credentials returned by an OAuth provider. Implementations specify the details about each auth provider's credential requirements.
4 |
5 | ## Properties
6 |
7 | ### providerId
8 | [method]providerId returns string;[/method]
9 |
10 | The authentication provider ID for the credential. For example, 'facebook.com', or 'google.com'.
11 |
--------------------------------------------------------------------------------
/docs/firestore/reference/MetadataChanges.md:
--------------------------------------------------------------------------------
1 | # MetadataChanges
2 |
3 | Options for use with `DocumentReference.onSnapshot()` and `CollectionReference.onSnapshot()` to control the behavior of the snapshot listener.
4 |
5 | ## Properties
6 |
7 | ### includeMetadataChanges
8 | [method]includeMetadataChanges returns boolean;[/method]
9 |
10 | Raise an event even if only metadata of the document or query changes. Default is false.
11 |
--------------------------------------------------------------------------------
/docs/auth/reference/AdditionalUserInfo.md:
--------------------------------------------------------------------------------
1 | # AdditionalUserInfo
2 |
3 | A structure containing additional user information from a federated identity provider.
4 |
5 | ## Properties
6 |
7 | ### isNewUser
8 | [method]isNewUser returns boolean;[/method]
9 |
10 | ### profile
11 | [method]profile returns nullable Object;[/method]
12 |
13 | ### providerId
14 | [method]providerId returns string;[/method]
15 |
16 | ### username
17 | [method]username returns nullable string or undefined;[/method]
18 |
--------------------------------------------------------------------------------
/docs/auth/reference/UserMetadata.md:
--------------------------------------------------------------------------------
1 | # UserMetadata
2 |
3 | Interface representing a user's metadata.
4 |
5 | ## Properties
6 |
7 | ### creationTime
8 | [method]creationTime returns nullable string;[/method]
9 |
10 | The date the user was created, formatted as a UTC string. For example, 'Fri, 22 Sep 2017 01:49:58 GMT'.
11 |
12 | ### lastSignInTime
13 | [method]lastSignInTime returns nullable string;[/method]
14 |
15 | The date the user last signed in, formatted as a UTC string. For example, 'Fri, 22 Sep 2017 01:49:58 GMT'.
16 |
--------------------------------------------------------------------------------
/docs/notifications/reference/IOSAttachment.md:
--------------------------------------------------------------------------------
1 | # IOSAttachment
2 |
3 | Information about an attachment displayed as part of an IOS Notification.
4 |
5 | ## Properties
6 |
7 | ### identifier
8 | [method]identifier returns string;[/method]
9 |
10 | The ID of the attachment.
11 |
12 | ### options
13 | [method]options returns optional [ref notifications.IOSAttachmentOptions];[/method]
14 |
15 | The optional options object defining the behaviour of the attachment.
16 |
17 | ### url
18 | [method]url returns string;[/method]
19 |
20 | The URL of the attachment.
21 |
--------------------------------------------------------------------------------
/docs/messaging/reference/IOSMessaging.md:
--------------------------------------------------------------------------------
1 | # IOSMessaging
2 |
3 | iOS specific messaging / APNS properties.
4 |
5 | ## Methods
6 |
7 | ### registerForRemoteNotifications
8 | [method]registerForRemoteNotifications() returns Promise containing void;[/method]
9 |
10 | Register for iOS remote notifications(APNS).
11 |
12 | ### getAPNSToken
13 | [method]getAPNSToken() returns Promise containing nullable string;[/method]
14 |
15 | Get current APNS token linked with firebase.
16 |
17 | Returns a promise that resolves with the token string if APNS is registered. Otherwise it resolves with null.
18 |
--------------------------------------------------------------------------------
/docs/storage/reference/StorageTask.md:
--------------------------------------------------------------------------------
1 | ## TODO
2 |
3 | These docs are still WIP. Please see the below links as reference for the time being:
4 |
5 | https://github.com/invertase/react-native-firebase/blob/docs_old/docs/modules/storage.md
6 | https://github.com/invertase/react-native-firebase/blob/master/tests/src/tests/storage/storageTests.js
7 |
8 | https://github.com/invertase/react-native-firebase/blob/master/lib/modules/storage/reference.js
9 | https://github.com/invertase/react-native-firebase/blob/master/lib/modules/storage/task.js
10 |
11 | PR's to contribute to docs are welcome.
12 |
--------------------------------------------------------------------------------
/docs/links/reference/NavigationParameters.md:
--------------------------------------------------------------------------------
1 | # NavigationParameters
2 |
3 | Navigation specific link settings.
4 |
5 | ## Methods
6 |
7 | ### setForcedRedirectEnabled
8 | [method]setForcedRedirectEnabled(forcedRedirectEnabled) returns [ref links.DynamicLink];[/method]
9 |
10 | Sets whether to enable force redirecting or going to the app preview page. Defaults to false.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | forcedRedirectEnabled | **boolean** If true, app preview page will be disabled and there will be a redirect to the FDL. If false, go to the app preview page. |
15 |
--------------------------------------------------------------------------------
/docs/firestore/reference/SetOptions.md:
--------------------------------------------------------------------------------
1 | # SetOptions
2 |
3 | An options object that configures the behavior of `set()` calls in [ref firestore.DocumentReference], [ref firestore.WriteBatch] and [ref firestore.Transaction]. These calls can be configured to perform granular merges instead of overwriting the target documents in their entirety by providing a SetOptions with merge: true.
4 |
5 | ## Properties
6 |
7 | ### merge
8 | [method]merge returns boolean;[/method]
9 |
10 | Changes the behavior of a set() call to only replace the values specified in its data argument. Fields omitted from the set() call remain untouched.
--------------------------------------------------------------------------------
/docs/auth/reference/GithubAuthProvider.md:
--------------------------------------------------------------------------------
1 | # GithubAuthProvider
2 |
3 | ```
4 | firebase.auth.GithubAuthProvider
5 | ```
6 |
7 | ## Properties
8 |
9 | ### PROVIDER_ID
10 | [method]PROVIDER_ID returns string;[/method]
11 |
12 | ### providerId
13 | [method]providerId returns string;[/method]
14 |
15 | ## Methods
16 |
17 | ### credential
18 | [method]credential(token) returns [ref auth.AuthCredential];[/method]
19 |
20 | | Parameter | |
21 | | --------- | ------- |
22 | | token | **string** Github accessToken. |
23 |
24 | #### Example
25 |
26 | ```js
27 | const cred = firebase.auth.GithubAuthProvider.credential(
28 | accessToken
29 | );
30 | ```
31 |
--------------------------------------------------------------------------------
/docs/database/reference/ServerValue.md:
--------------------------------------------------------------------------------
1 | # ServerValue
2 |
3 | ```
4 | firebase.database.ServerValue
5 | ```
6 |
7 | ## Properties
8 |
9 | ### TIMESTAMP
10 | [method]TIMESTAMP returns non-null Object[/method]
11 |
12 | A placeholder value for auto-populating the current timestamp (time since the Unix epoch, in milliseconds) as determined by the Firebase servers.
13 |
14 | > This adds the Object `{ '.sv': 'timestamp' }` which Firebase converts to the server timestamp.
15 |
16 | #### Example
17 |
18 | ```js
19 | var sessionsRef = firebase.database().ref("sessions");
20 |
21 | sessionsRef.push({
22 | startedAt: firebase.database.ServerValue.TIMESTAMP
23 | });
24 | ```
25 |
--------------------------------------------------------------------------------
/docs/auth/reference/FacebookAuthProvider.md:
--------------------------------------------------------------------------------
1 | # FacebookAuthProvider
2 |
3 | ```
4 | firebase.auth.FacebookAuthProvider
5 | ```
6 |
7 | ## Properties
8 |
9 | ### PROVIDER_ID
10 | [method]PROVIDER_ID returns string;[/method]
11 |
12 | ### providerId
13 | [method]providerId returns string;[/method]
14 |
15 | ## Methods
16 |
17 | ### credential
18 | [method]credential(token) returns [ref auth.AuthCredential];[/method]
19 |
20 | | Parameter | |
21 | | --------- | ------- |
22 | | token | **string** Facebook accessToken. |
23 |
24 | #### Example
25 |
26 | ```js
27 | const cred = firebase.auth.FacebookAuthProvider.credential(
28 | accessToken
29 | );
30 | ```
31 |
--------------------------------------------------------------------------------
/docs/auth/reference/ConfirmationResult.md:
--------------------------------------------------------------------------------
1 | # ConfirmationResult
2 |
3 | Returned as the result from [ref auth#signInWithPhoneNumber].
4 |
5 | ## Properties
6 |
7 | ### verificationId
8 | [method]verificationId returns nullable string;[/method]
9 |
10 | Returns this confirmation results unique ID.
11 |
12 | ## Methods
13 |
14 | ### confirm
15 | [method]confirm(verificationCode) returns Promise containing [ref auth.User];[/method]
16 |
17 | Confirms a verification request by passing in the verification code sent with the SMS.
18 |
19 | | Parameter | |
20 | | --------- | ------- |
21 | | verificationCode | **string** Code sent with the SMS verification message. |
22 |
--------------------------------------------------------------------------------
/docs/auth/reference/OAuthProvider.md:
--------------------------------------------------------------------------------
1 | # OAuthProvider
2 |
3 | ```
4 | firebase.auth.OAuthProvider
5 | ```
6 |
7 | ## Properties
8 |
9 | ### PROVIDER_ID
10 | [method]PROVIDER_ID returns string;[/method]
11 |
12 | ### providerId
13 | [method]providerId returns string;[/method]
14 |
15 | ## Methods
16 |
17 | ### credential
18 | [method]credential(idToken, accessToken) returns [ref auth.OAuthCredential][/method]
19 |
20 | | Parameter | |
21 | | --------- | ------- |
22 | | idToken | **string** |
23 | | accessToken | **string** |
24 |
25 | #### Example
26 |
27 | ```js
28 | const cred = firebase.auth.OAuthProvider.credential(
29 | idToken,
30 | accessToken
31 | );
32 | ```
33 |
--------------------------------------------------------------------------------
/docs/auth/reference/PhoneAuthProvider.md:
--------------------------------------------------------------------------------
1 | # PhoneAuthProvider
2 |
3 | ```
4 | firebase.auth.PhoneAuthProvider
5 | ```
6 |
7 | ## Properties
8 |
9 | ### PROVIDER_ID
10 | [method]PROVIDER_ID returns string;[/method]
11 |
12 | ### providerId
13 | [method]providerId returns string;[/method]
14 |
15 | ## Methods
16 |
17 | ### credential
18 | [method]credential(verificationId, code) returns [ref auth.AuthCredential][/method]
19 |
20 | | Parameter | |
21 | | --------- | ------- |
22 | | verificationId | **string** |
23 | | code | **string** |
24 |
25 | #### Example
26 |
27 | ```js
28 | const cred = firebase.auth.PhoneAuthProvider.credential(
29 | verificationId,
30 | code
31 | );
32 | ```
33 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidVisibility.md:
--------------------------------------------------------------------------------
1 | # AndroidVisibility
2 |
3 | ```
4 | firebase.notifications.Android.Visibility
5 | ```
6 |
7 | ## Constants
8 |
9 | ### Private
10 |
11 | Show this notification on all lockscreens, but conceal sensitive or private information on secure lockscreens.
12 |
13 | ```
14 | firebase.notifications.Android.Visibility.Private
15 | ```
16 |
17 | ### Public
18 |
19 | Show this notification in its entirety on all lockscreens.
20 |
21 | ```
22 | firebase.notifications.Android.Visibility.Public
23 | ```
24 |
25 | ### Secret
26 |
27 | Do not reveal any part of this notification on a secure lockscreen.
28 |
29 | ```
30 | firebase.notifications.Android.Visibility.Secret
31 | ```
32 |
--------------------------------------------------------------------------------
/docs/notifications/reference/NotificationOpen.md:
--------------------------------------------------------------------------------
1 | # NotificationOpen
2 |
3 | Object giving information about the action that was taken when a specific notification was opened.
4 |
5 | ## Properties
6 |
7 | ### action
8 | [method]action returns string;[/method]
9 |
10 | The action that was used when the notification was opened.
11 |
12 | ### notification
13 | [method]notification returns [ref notifications.Notification];[/method]
14 |
15 | Information about the notification that was opened.
16 |
17 | ### results
18 | [method]results returns nullable Object;[/method]
19 |
20 | If the notification contains a [ref notifications.AndroidRemoteInput] then this object will be populated with the user's input.
21 |
22 | > Android only
23 |
--------------------------------------------------------------------------------
/docs/auth/reference/TwitterAuthProvider.md:
--------------------------------------------------------------------------------
1 | # TwitterAuthProvider
2 |
3 | ```
4 | firebase.auth.TwitterAuthProvider
5 | ```
6 |
7 | ## Properties
8 |
9 | ### PROVIDER_ID
10 | [method]PROVIDER_ID returns string;[/method]
11 |
12 | ### providerId
13 | [method]providerId returns string;[/method]
14 |
15 | ## Methods
16 |
17 | ### credential
18 | [method]credential(token, secret) returns [ref auth.AuthCredential][/method]
19 |
20 | | Parameter | |
21 | | --------- | ------- |
22 | | token | **string** Twitter accessToken. |
23 | | secret | **string** Twitter secret. |
24 |
25 | #### Example
26 |
27 | ```js
28 | const cred = firebase.auth.TwitterAuthProvider.credential(
29 | token,
30 | secret
31 | );
32 | ```
33 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidChannelGroup.md:
--------------------------------------------------------------------------------
1 | # AndroidChannelGroup
2 |
3 | ```
4 | firebase.notifications.Android.ChannelGroup
5 | ```
6 |
7 | ### Constructor
8 | [method]new firebase.notifications.Android.ChannelGroup(groupId, name);[/method]
9 |
10 | A grouping of related notification channels. e.g., channels that all belong to a single account.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | groupId | **string** |
15 | | name | **string** |
16 |
17 | ## Properties
18 |
19 | ### groupId
20 | [method]groupId returns nullable string;[/method]
21 |
22 | Returns the id of this channel group.
23 |
24 | ### name
25 | [method]name returns string;[/method]
26 |
27 | The user visible name of this channel group.
28 |
--------------------------------------------------------------------------------
/docs/notifications/reference/Schedule.md:
--------------------------------------------------------------------------------
1 | # Schedule
2 |
3 | Object giving information about the schedule to use for a notification.
4 |
5 | ## Properties
6 |
7 | ### exact
8 | [method]exact returns nullable boolean;[/method]
9 |
10 | > Android only
11 |
12 | If the fireDate should be respected exactly, i.e. for reminders, or if it can deviate slightly to save battery.
13 |
14 | ### fireDate
15 | [method]fireDate returns number;[/method]
16 |
17 | The date when the notification should first be shown, in milliseconds since 1970.
18 |
19 | ### repeatInterval
20 | [method]repeatInterval returns nullable string;[/method]
21 |
22 | How frequently the notification should be repeated. One of `minute`, `hour`, `day` or `week`.
23 |
24 | If not present, the notification will be displayed once.
--------------------------------------------------------------------------------
/docs/firestore/reference/GeoPoint.md:
--------------------------------------------------------------------------------
1 | # GeoPoint
2 |
3 | ```
4 | new firebase.firestore.GeoPoint
5 | ```
6 |
7 | ### GeoPoint
8 | [method]new GeoPoint(latitude, longitude);[/method]
9 |
10 | An immutable object representing a geo point in Cloud Firestore. The geo point is represented as latitude/longitude pair.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | latitude | **number** Latitude values are in the range of -90 to 90. |
15 | | longitude | **number** Longitude values are in the range of -180 to 180. |
16 |
17 | ## Properties
18 |
19 | ### latitude
20 | [method]latitude returns number;[/method]
21 |
22 | The latitude of this GeoPoint instance.
23 |
24 | ### longitude
25 | [method]longitude returns number;[/method]
26 |
27 | The longitude of this GeoPoint instance.
28 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidBadgeIconType.md:
--------------------------------------------------------------------------------
1 | # AndroidBadgeIconType
2 |
3 | ```
4 | firebase.notifications.Android.BadgeIconType
5 | ```
6 |
7 | ## Constants
8 |
9 | ### None
10 |
11 | If this notification is being shown as a badge, always show as a number.
12 |
13 | ```
14 | firebase.notifications.Android.BadgeIconType.None
15 | ```
16 |
17 | ### Small
18 |
19 | If this notification is being shown as a badge, use the icon provided to setSmallIcon(int) to represent this notification.
20 |
21 | ```
22 | firebase.notifications.Android.BadgeIconType.Small
23 | ```
24 |
25 | ### Large
26 |
27 | If this notification is being shown as a badge, use the icon provided to {@link Builder#setLargeIcon(Bitmap) to represent this notification.
28 |
29 | ```
30 | firebase.notifications.Android.BadgeIconType.Large
31 | ```
--------------------------------------------------------------------------------
/docs/notifications/reference/IOSAttachmentOptions.md:
--------------------------------------------------------------------------------
1 | # IOSAttachmentOptions
2 |
3 | Controls how an attachment is displayed as part of an IOS Notification.
4 |
5 | ## Properties
6 |
7 | ### typeHint
8 | [method]typeHint returns string;[/method]
9 |
10 | A hint about an attachment’s file type.
11 |
12 | ### thumbnailHidden
13 | [method]thumbnailHidden returns boolean;[/method]
14 |
15 | A Boolean value indicating whether the attachment’s thumbnail is hidden.
16 |
17 | ### thumbnailClippingRect
18 | [method]thumbnailClippingRect returns Object;[/method]
19 |
20 | The clipping rectangle for a thumbnail image defined as an Object with `height`, `width`, `x` and `y` properties.
21 |
22 | ### typeHint
23 | [method]thumbnailTime returns string;[/method]
24 |
25 | The frame number of an animation to use as a thumbnail image.
26 |
--------------------------------------------------------------------------------
/docs/installation/javascript.md:
--------------------------------------------------------------------------------
1 | # JavaScript Installation/Usage
2 |
3 | Once RNFirebase & Firebase has been setup, you can now use the library within your JavaScript like any other node module.
4 |
5 | ## Import the module
6 |
7 | ```javascript
8 | import firebase from 'react-native-firebase';
9 | ```
10 |
11 | As the default app is pre-initialized natively there is no need to call initializeApp for the default app instance. Just import and go:
12 |
13 | ```javascript
14 | import firebase from 'react-native-firebase';
15 |
16 | firebase.auth().signInAnonymously()
17 | .then((user) => {
18 | console.log(user.isAnonymous);
19 | });
20 | ```
21 |
22 | ## Multiple app instances
23 |
24 | React Native Firebase supports multiple app instances. For more information see the [initializing multiple apps documentation](version /core/initialize-apps).
25 |
--------------------------------------------------------------------------------
/docs/auth/reference/GoogleAuthProvider.md:
--------------------------------------------------------------------------------
1 | # GoogleAuthProvider
2 |
3 | ```
4 | firebase.auth.GoogleAuthProvider
5 | ```
6 |
7 | ## Properties
8 |
9 | ### PROVIDER_ID
10 | [method]PROVIDER_ID returns string;[/method]
11 |
12 | ### providerId
13 | [method]providerId returns string;[/method]
14 |
15 | ## Methods
16 |
17 | ### credential
18 | [method]credential(idToken, accessToken) returns [ref auth.AuthCredential];[/method]
19 |
20 | Creates a credential for Google. At least one of ID token and access token is required.
21 |
22 | | Parameter | |
23 | | --------- | ------- |
24 | | idToken | **string** (optional) Google ID token. Value may be null. |
25 | | accessToken | **string** (optional) Google ID token. Value may be null. |
26 |
27 | #### Example
28 |
29 | ```js
30 | const cred = firebase.auth.GoogleAuthProvider.credential(
31 | idToken,
32 | accessToken,
33 | );
34 | ```
35 |
--------------------------------------------------------------------------------
/docs/iid/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Install the RNFirebase Instance ID package
6 |
7 | Add the `RNFirebaseInstanceIdPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
8 |
9 | ```java
10 | // ...
11 | import io.invertase.firebase.RNFirebasePackage;
12 | import io.invertase.firebase.instanceid.RNFirebaseInstanceIdPackage; // <-- Add this line
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 | // ...
16 |
17 | @Override
18 | protected List getPackages() {
19 | return Arrays.asList(
20 | new MainReactPackage(),
21 | new RNFirebasePackage(),
22 | new RNFirebaseInstanceIdPackage() // <-- Add this line
23 | );
24 | }
25 | };
26 | // ...
27 | }
28 | ```
29 |
--------------------------------------------------------------------------------
/docs/firestore/reference/FieldPath.md:
--------------------------------------------------------------------------------
1 | # FieldPath
2 |
3 | ```
4 | firebase.firestore.FieldPath
5 | ```
6 |
7 | ### FieldPath
8 | [method]new FieldPath(...var_args);[/method]
9 |
10 | A FieldPath refers to a field in a document. The path may consist of a single field name (referring to a top-level field in the document), or a list of field names (referring to a nested field in the document).
11 |
12 | Create a FieldPath by providing field names. If more than one field name is provided, the path will point to a nested field in a document.
13 |
14 | | Parameter | |
15 | | --------- | ------- |
16 | | var_args | A list of field names. Value may be repeated. |
17 |
18 | ## Methods
19 |
20 | ### documentId
21 | [methods]documentId() returns [ref firestore.FieldPath];[/methods]
22 |
23 | Returns a special sentinel `FieldPath` to refer to the ID of a document. It can be used in queries to sort or filter by the document ID.
24 |
--------------------------------------------------------------------------------
/docs/config/example.md:
--------------------------------------------------------------------------------
1 | # Remote Config Example
2 |
3 | The following example shows how you'd enable a feature in your app (`enableSuperCoolFeature`) if Remote Config returns `hasExperimentalFeature` being true.
4 |
5 | ```js
6 | if (__DEV__) {
7 | firebase.config().enableDeveloperMode();
8 | }
9 |
10 | // Set default values
11 | firebase.config().setDefaults({
12 | hasExperimentalFeature: false,
13 | });
14 |
15 | firebase.config().fetch()
16 | .then(() => {
17 | return firebase.config().activateFetched();
18 | })
19 | .then((activated) => {
20 | if (!activated) console.log('Fetched data not activated');
21 | return firebase.config().getValue('hasExperimentalFeature');
22 | })
23 | .then((snapshot) => {
24 | const hasExperimentalFeature = snapshot.val();
25 |
26 | if(hasExperimentalFeature) {
27 | enableSuperCoolFeature();
28 | }
29 |
30 | // continue booting app
31 | })
32 | .catch(console.error);
33 | ```
34 |
--------------------------------------------------------------------------------
/docs/auth/reference/UserInfo.md:
--------------------------------------------------------------------------------
1 | # UserInfo
2 |
3 | User profile information, visible only to the Firebase project's apps.
4 |
5 | ## Properties
6 |
7 | ### displayName
8 | [method]displayName returns nullable string;[/method]
9 |
10 | The user's display name (if available).
11 |
12 | ### email
13 | [method]email returns nullable string;[/method]
14 |
15 | The user's email address (if available).
16 |
17 | ### phoneNumber
18 | [method]phoneNumber returns nullable string;[/method]
19 |
20 | The user's E.164 formatted phone number (if available).
21 |
22 | ### photoURL
23 | [method]photoURL returns nullable string;[/method]
24 |
25 | The URL of the user's profile picture (if available).
26 |
27 | ### providerId
28 | [method]providerId returns string;[/method]
29 |
30 | The authentication provider ID for the current user. For example, 'facebook.com', or 'google.com'.
31 |
32 | ### uid
33 | [method]uid returns string;[/method]
34 |
35 | The user's unique ID.
36 |
--------------------------------------------------------------------------------
/docs/firestore/reference/SnapshotMetadata.md:
--------------------------------------------------------------------------------
1 | # SnapshotMetadata
2 |
3 | Metadata about a snapshot, describing the state of the snapshot.
4 |
5 | ## Properties
6 |
7 | ### fromCache
8 | [method]fromCache returns boolean;[/method]
9 |
10 | True if the snapshot was created from cached data rather than guaranteed up-to-date server data. If your listener has opted into metadata updates (via [ref firestore.MetadataChanges]) you will receive another snapshot with `fromCache` set to false once the client has received up-to-date data from the backend.
11 |
12 | ### hasPendingWrites
13 | [method]hasPendingWrites returns boolean;[/method]
14 |
15 | True if the snapshot includes local writes (`set()` or `update()` calls) that haven't been committed to the backend yet.
16 |
17 | If your listener has opted into metadata updates via [ref firestore.MetadataChanges], you receive another snapshot with `hasPendingWrites` set to false once the writes have been committed to the backend.
--------------------------------------------------------------------------------
/docs/firestore/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/Firestore', '~> {{ ios.firebase.firestore }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
15 | ## Troubleshooting
16 |
17 | Your Xcode project may fail to build if you are including the Google Signin pod (`pod 'GoogleSignIn'`) in your project, this appears to be due to some extra search paths that need to be removed.
18 |
19 | Invertase has a fork of the project at https://github.com/invertase/react-native-google-signin, which you can add to your project using:
20 |
21 | ```
22 | npm install --save https://github.com/invertase/react-native-google-signin.git#v0.12.1
23 | ```
24 |
25 | You can see the relevant discussion on github issues [here](https://github.com/invertase/react-native-firebase/issues/758#issuecomment-358575691).
26 |
--------------------------------------------------------------------------------
/docs/core/reference/App.md:
--------------------------------------------------------------------------------
1 | # App
2 |
3 | ## Methods
4 |
5 | ### extendApp
6 | [method]extendApp(props) returns void;[/method]
7 |
8 | Allows adding additional properties onto a firebase app instance.
9 |
10 | ?> This methods is undocumented on the web SDK.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | props | **Object** |
15 |
16 | ### delete
17 | [method]delete() returns Promise;[/method]
18 |
19 | Renders this app instance unusable and frees the resources of all associated services.
20 |
21 | ?> Due to native sdk requirments; the default app can not be deleted and will throw an error if a delete is attempted.
22 |
23 | ### onReady
24 | [method]onReady() returns Promise containing [App](#methods);[/method]
25 |
26 | Resolves a promise once the App instance has been initilized.
27 |
28 | ## Properties
29 |
30 | ### name
31 | [method]name returns string;[/method]
32 |
33 | ### options
34 | [method]options returns Object;[/method]
35 |
36 |
--------------------------------------------------------------------------------
/docs/auth/reference/UserCredential.md:
--------------------------------------------------------------------------------
1 | # UserCredential
2 |
3 | A structure containing a User, an AuthCredential, the operationType, and any additional user information that was returned from the identity provider. operationType could be 'signIn' for a sign-in operation, 'link' for a linking operation and 'reauthenticate' for a reauthentication operation.
4 |
5 | ## Properties
6 |
7 | ### user
8 | [method]user returns nullable [ref auth.User];[/method]
9 |
10 | ### additionalUserInfo
11 | [method]additionalUserInfo returns nullable [ref auth.AdditionalUserInfo] or undefined;[/method]
12 |
13 | ## Unsupported Methods
14 |
15 | The following methods are not supported in RNFirebase as they cannot work in the React Native environment or have a different implementation.
16 |
17 | ### credential
18 |
19 |
20 | ### operationType
21 |
22 |
--------------------------------------------------------------------------------
/docs/analytics/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | Analytics does not require any other dependencies to work.
6 |
7 | ## Install the RNFirebase Analytics package
8 |
9 | Add the `RNFirebaseAnalyticsPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
10 |
11 | ```java
12 | // ...
13 | import io.invertase.firebase.RNFirebasePackage;
14 | import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; // <-- Add this line
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 | // ...
18 |
19 | @Override
20 | protected List getPackages() {
21 | return Arrays.asList(
22 | new MainReactPackage(),
23 | new RNFirebasePackage(),
24 | new RNFirebaseAnalyticsPackage() // <-- Add this line
25 | );
26 | }
27 | };
28 | // ...
29 | }
30 | ```
31 |
--------------------------------------------------------------------------------
/docs/_config.yaml:
--------------------------------------------------------------------------------
1 | android:
2 | build:
3 | tools: 3.2.0
4 | fabric:
5 | tools: 1.25.4
6 | version: 2.9.5
7 | firebase:
8 | version: 16.0.6
9 | ads: 15.0.1
10 | analytics: 16.0.6 # part of core ??
11 | auth: 16.1.0
12 | config: 16.1.2
13 | core: 16.0.6
14 | crashlytics: 2.9.5
15 | database: 16.0.5
16 | firestore: 17.1.5
17 | functions: 16.1.3
18 | invites: 16.0.6
19 | messaging: 17.3.4
20 | perf: 16.2.3
21 | storage: 16.0.5
22 | plugins: 1.1.5
23 | gms:
24 | google-services: 4.0.1
25 | play-services-base: 16.0.1
26 | ios:
27 | fabric:
28 | tools: 1.7.13
29 | version: 3.10.9
30 | firebase:
31 | ads: 5.15.0
32 | auth: 5.15.0
33 | config: 5.15.0
34 | core: 5.15.0
35 | crash: 5.15.0
36 | crashlytics: 3.10.7
37 | database: 5.15.0
38 | firestore: 5.15.0
39 | functions: 5.15.0
40 | invites: 5.15.0
41 | links: 5.15.0
42 | messaging: 5.15.0
43 | perf: 5.15.0
44 | storage: 5.15.0
45 |
--------------------------------------------------------------------------------
/docs/analytics/reserved-events.md:
--------------------------------------------------------------------------------
1 | # Reserved Events
2 |
3 | A number of methods are provided to help tailor analytics specifically for your own app, however the Firebase SDK includes a number of pre-set events which are automatically handled and cannot be used with custom [logEvent](version /analytics/reference/analytics#logevent) events.
4 |
5 | !> Attempting to use one of these events will throw an exception.
6 |
7 | ```javascript
8 | const reserved = [
9 | 'app_clear_data',
10 | 'app_uninstall',
11 | 'app_update',
12 | 'error',
13 | 'first_open',
14 | 'first_visit',
15 | 'first_open_time',
16 | 'first_visit_time',
17 | 'in_app_purchase',
18 | 'notification_dismiss',
19 | 'notification_foreground',
20 | 'notification_open',
21 | 'notification_receive',
22 | 'os_update',
23 | 'session_start',
24 | 'screen_view',
25 | 'user_engagement',
26 | 'ad_impression',
27 | 'ad_click',
28 | 'ad_query',
29 | 'ad_exposure',
30 | 'adunit_exposure',
31 | 'ad_activeiew',
32 | ];
33 | ```
34 |
--------------------------------------------------------------------------------
/docs/crashlytics/manual-initialization.md:
--------------------------------------------------------------------------------
1 | # Manual Initialization
2 |
3 | By default, Firebase Crashlytics automatically collects crash reports for all your app's users. To give users more control over the data they send, you can enable opt-in reporting instead.
4 |
5 | To do that, you have to disable automatic collection and initialize Crashlytics only for opt-in users.
6 |
7 | ## 1) Disable automatic initialization
8 |
9 | ### iOS:
10 |
11 | Turn off automatic collection with a new key to your `Info.plist` file:
12 |
13 | * Key: `firebase_crashlytics_collection_enabled`
14 | * Value: `false`
15 |
16 | ### Android:
17 |
18 | Turn off automatic collection with a meta-data tag in your `AndroidManifest.xml` file:
19 |
20 | ```xml
21 |
24 | ```
25 |
26 | ## 2) Enable collection at runtime
27 |
28 | Initializing Crashlytics in your js code:
29 |
30 | ```js
31 | firebase.crashlytics().enableCrashlyticsCollection();
32 | ```
33 |
--------------------------------------------------------------------------------
/docs/links/reference/SocialParameters.md:
--------------------------------------------------------------------------------
1 | # SocialParameters
2 |
3 | Social specific link settings.
4 |
5 | ## Methods
6 |
7 | ### setDescriptionText
8 | [method]setDescriptionText(descriptionText) returns [ref links.DynamicLink];[/method]
9 |
10 | Sets the meta-tag description.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | descriptionText | **string** The description to use when the Dynamic Link is shared in a social post. |
15 |
16 | ### setImageUrl
17 | [method]setImageUrl(imageUrl) returns [ref links.DynamicLink];[/method]
18 |
19 | Sets the meta-tag image link.
20 |
21 | | Parameter | |
22 | | --------- | ------- |
23 | | imageUrl | **string** The URL to an image related to this link. |
24 |
25 | ### setTitle
26 | [method]setTitle(title) returns [ref links.DynamicLink];[/method]
27 |
28 | Sets the meta-tag title.
29 |
30 | | Parameter | |
31 | | --------- | ------- |
32 | | title | **string** The title to use when the Dynamic Link is shared in a social post. |
33 |
--------------------------------------------------------------------------------
/docs/messaging/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ?> FCM does not work on the iOS simulator, you must test them using a real device. This is a restriction enforced by Apple.
6 |
7 | ## Add the pod
8 |
9 | Add the following to your `Podfile`:
10 |
11 | ```ruby
12 | pod 'Firebase/Messaging', '~> {{ ios.firebase.messaging }}'
13 | ```
14 |
15 | Run `pod update`.
16 |
17 | ## Setup Certificates
18 |
19 | Please follow the instructions on the [Firebase docs](https://firebase.google.com/docs/cloud-messaging/ios/certs) on how to setup your APN certificates with FCM.
20 |
21 | ## Enable Capabilities
22 |
23 | In Xcode, enable the following capabilities:
24 |
25 | 1) Push Notifications
26 | 2) Background modes > Remote notifications
27 |
28 | ## Debugging
29 |
30 | If you're having problems with messages not being received, check out the following blog post for help:
31 |
32 | https://firebase.googleblog.com/2017/01/debugging-firebase-cloud-messaging-on.html
33 |
--------------------------------------------------------------------------------
/docs/storage/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | ## Add the dependency
4 |
5 | Add the Firebase Storage dependency to `android/app/build.gradle`:
6 |
7 | ```groovy
8 | dependencies {
9 | // ...
10 | implementation "com.google.firebase:firebase-storage:{{ android.firebase.storage }}"
11 | }
12 | ```
13 |
14 | ## Install the RNFirebase Storage package
15 |
16 | Add the `RNFirebaseStoragePackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
17 |
18 | ```java
19 | // ...
20 | import io.invertase.firebase.RNFirebasePackage;
21 | import io.invertase.firebase.storage.RNFirebaseStoragePackage; // <-- Add this line
22 |
23 | public class MainApplication extends Application implements ReactApplication {
24 | // ...
25 |
26 | @Override
27 | protected List getPackages() {
28 | return Arrays.asList(
29 | new MainReactPackage(),
30 | new RNFirebasePackage(),
31 | new RNFirebaseStoragePackage() // <-- Add this line
32 | );
33 | }
34 | };
35 | // ...
36 | }
37 | ```
38 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidDefaults.md:
--------------------------------------------------------------------------------
1 | # AndroidDefaults
2 |
3 | ```
4 | firebase.notifications.Android.Defaults
5 | ```
6 |
7 | ## Constants
8 |
9 | ### All
10 |
11 | Use all default values (where applicable).
12 |
13 | ```
14 | firebase.notifications.Android.Defaults.All
15 | ```
16 |
17 | ### Lights
18 |
19 | Use the default notification lights. This will ignore any given `lights` options.
20 |
21 | ```
22 | firebase.notifications.Android.Defaults.Lights
23 | ```
24 |
25 | ### Sound
26 |
27 | Use the default notification sound. This will ignore any given `sound`.
28 |
29 | A notification that is noisy is more likely to be presented as a heads-up notification.
30 |
31 | ```
32 | firebase.notifications.Android.Defaults.Sound
33 | ```
34 |
35 | ### Vibrate
36 |
37 | Use the default notification vibrate. This will ignore any given `vibrate`. Using phone vibration requires the VIBRATE permission.
38 |
39 | A notification that vibrates is more likely to be presented as a heads-up notification.
40 |
41 | ```
42 | firebase.notifications.Android.Defaults.Vibrate
43 | ```
--------------------------------------------------------------------------------
/docs/database/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | ## Add the dependency
4 |
5 | Add the Firebase Realtime Database dependency to `android/app/build.gradle`:
6 |
7 | ```groovy
8 | dependencies {
9 | // ...
10 | implementation "com.google.firebase:firebase-database:{{ android.firebase.database }}"
11 | }
12 | ```
13 |
14 | ## Install the RNFirebase Database package
15 |
16 | Add the `RNFirebaseDatabasePackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
17 |
18 | ```java
19 | // ...
20 | import io.invertase.firebase.RNFirebasePackage;
21 | import io.invertase.firebase.database.RNFirebaseDatabasePackage; // <-- Add this line
22 |
23 | public class MainApplication extends Application implements ReactApplication {
24 | // ...
25 |
26 | @Override
27 | protected List getPackages() {
28 | return Arrays.asList(
29 | new MainReactPackage(),
30 | new RNFirebasePackage(),
31 | new RNFirebaseDatabasePackage() // <-- Add this line
32 | );
33 | }
34 | };
35 | // ...
36 | }
37 | ```
38 |
--------------------------------------------------------------------------------
/docs/admob/reference/VideoOptions.md:
--------------------------------------------------------------------------------
1 | # Video Options
2 |
3 | ```
4 | firebase.admob.VideoOptions
5 | ```
6 |
7 | The VideoOptions class is used to create an object to be passed through to each advert request. If the advert returns a video, the options are used when displaying it on the application.
8 |
9 | ?> Currently `NativeExpress` only accepts VideoOptions. If no VideoOptions are sent, the default options call `setStartMuted(true)`.
10 |
11 | ## Methods
12 |
13 | ### build
14 | [method]build() returns object;[/method]
15 |
16 | Builds the current video options for AdMob to handle.
17 |
18 | ### setStartMuted
19 | [method]setStartMuted(muted) returns this;[/method]
20 |
21 | If true, any returned video will not play sound when it starts. The end user can manually enable sound on the advert interface.
22 |
23 | | Parameter | |
24 | | --------- | ------- |
25 | | muted | **boolean** |
26 |
27 | ## Example
28 |
29 | ```js
30 | const options = new firebase.admob.VideoOptions();
31 | options.setStartMuted(false);
32 | ...
33 |
34 | The affiliate token used to create affiliate-coded links. |
15 |
16 | ### setCampaignToken
17 | [method]setCampaignToken(campaignToken) returns [ref links.DynamicLink];[/method]
18 |
19 | Sets the campaign token.
20 |
21 | | Parameter | |
22 | | --------- | ------- |
23 | | content | **string** The campaign token that developers can add to any link in order to track sales from a specific marketing campaign. |
24 |
25 | ### setProviderToken
26 | [method]setProviderToken(providerToken) returns [ref links.DynamicLink];[/method]
27 |
28 | Sets the provider token.
29 |
30 | | Parameter | |
31 | | --------- | ------- |
32 | | providerToken | **string** The provider token that enables analytics for Dynamic Links from within iTunes Connect. |
33 |
--------------------------------------------------------------------------------
/docs/admob/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the dependency
6 |
7 | Add the Firebase Admob dependancy to `android/app/build.gradle`:
8 |
9 | ```groovy
10 | dependencies {
11 | // ...
12 | implementation "com.google.firebase:firebase-ads:{{ android.firebase.ads }}"
13 | }
14 | ```
15 |
16 | ## Install the RNFirebase Admob package
17 |
18 | Add the `RNFirebaseAdMobPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
19 |
20 | ```java
21 | // ...
22 | import io.invertase.firebase.RNFirebasePackage;
23 | import io.invertase.firebase.admob.RNFirebaseAdMobPackage; // <-- Add this line
24 |
25 | public class MainApplication extends Application implements ReactApplication {
26 | // ...
27 |
28 | @Override
29 | protected List getPackages() {
30 | return Arrays.asList(
31 | new MainReactPackage(),
32 | new RNFirebasePackage(),
33 | new RNFirebaseAdMobPackage() // <-- Add this line
34 | );
35 | }
36 | };
37 | // ...
38 | }
39 | ```
40 |
--------------------------------------------------------------------------------
/docs/firestore/reference/FieldValue.md:
--------------------------------------------------------------------------------
1 | # FieldValue
2 |
3 | ```
4 | firebase.firestore.FieldValue
5 | ```
6 |
7 | Sentinel values that can be used when writing document fields with set() or update().
8 |
9 | ## Methods
10 |
11 | ### delete
12 | [methods]delete() returns [ref firestore.FieldValue];[/methods]
13 |
14 | Returns a sentinel for use with update() to mark a field for deletion.
15 |
16 | ### serverTimestamp
17 | [methods]serverTimestamp() returns [ref firestore.FieldValue];[/methods]
18 |
19 | Returns a sentinel used with set() or update() to include a server-generated timestamp in the written data.
20 |
21 | ### arrayUnion
22 | [methods]arrayUnion(...var_args) returns [ref firestore.FieldValue];[/methods]
23 |
24 | Returns a special value that can be used with set() or update() that tells the server to union the given elements with any array value that already exists on the server.
25 |
26 | ### arrayRemove
27 | [methods]arrayRemove(...var_args) returns [ref firestore.FieldValue];[/methods]
28 |
29 | Returns a special value that can be used with set() or update() that tells the server to remove the given elements from any array value that already exists on the server.
30 |
--------------------------------------------------------------------------------
/docs/functions/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the dependency
6 |
7 | Add the Firebase Functions dependency to `android/app/build.gradle`:
8 |
9 | ```groovy
10 | dependencies {
11 | // ...
12 | implementation "com.google.firebase:firebase-functions:{{ android.firebase.functions }}"
13 | }
14 | ```
15 |
16 | ## Install the RNFirebase Functions package
17 |
18 | Add the `RNFirebaseFunctionsPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
19 |
20 | ```java
21 | // ...
22 | import io.invertase.firebase.RNFirebasePackage;
23 | import io.invertase.firebase.functions.RNFirebaseFunctionsPackage; // <-- Add this line
24 |
25 | public class MainApplication extends Application implements ReactApplication {
26 | // ...
27 |
28 | @Override
29 | protected List getPackages() {
30 | return Arrays.asList(
31 | new MainReactPackage(),
32 | new RNFirebasePackage(),
33 | new RNFirebaseFunctionsPackage() // <-- Add this line
34 | );
35 | }
36 | };
37 | // ...
38 | }
39 | ```
40 |
--------------------------------------------------------------------------------
/docs/config/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the dependency
6 |
7 | Add the Firebase Remote Config dependency to `android/app/build.gradle`:
8 |
9 | ```groovy
10 | dependencies {
11 | // ...
12 | implementation "com.google.firebase:firebase-config:{{ android.firebase.config }}"
13 | }
14 | ```
15 |
16 | ## Install the RNFirebase Remote Config package
17 |
18 | Add the `RNFirebaseRemoteConfigPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
19 |
20 | ```java
21 | // ...
22 | import io.invertase.firebase.RNFirebasePackage;
23 | import io.invertase.firebase.config.RNFirebaseRemoteConfigPackage; // <-- Add this line
24 |
25 | public class MainApplication extends Application implements ReactApplication {
26 | // ...
27 |
28 | @Override
29 | protected List getPackages() {
30 | return Arrays.asList(
31 | new MainReactPackage(),
32 | new RNFirebasePackage(),
33 | new RNFirebaseRemoteConfigPackage() // <-- Add this line
34 | );
35 | }
36 | };
37 | // ...
38 | }
39 | ```
40 |
--------------------------------------------------------------------------------
/docs/auth/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | ## Add the dependency
4 |
5 | Add the Firebase Authentication dependency to `android/app/build.gradle`:
6 |
7 | ```groovy
8 | dependencies {
9 | // ...
10 | implementation "com.google.firebase:firebase-auth:{{ android.firebase.auth }}"
11 | }
12 | ```
13 |
14 | ?> If you plan to make use of Email sign-in links then you'll also need to follow the [Dynamic Links for Android installation guide](version /links/android).
15 |
16 | ## Install the RNFirebase Authentication package
17 |
18 | Add the `RNFirebaseAuthPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
19 |
20 | ```java
21 | // ...
22 | import io.invertase.firebase.RNFirebasePackage;
23 | import io.invertase.firebase.auth.RNFirebaseAuthPackage; // <-- Add this line
24 |
25 | public class MainApplication extends Application implements ReactApplication {
26 | // ...
27 |
28 | @Override
29 | protected List getPackages() {
30 | return Arrays.asList(
31 | new MainReactPackage(),
32 | new RNFirebasePackage(),
33 | new RNFirebaseAuthPackage() // <-- Add this line
34 | );
35 | }
36 | };
37 | // ...
38 | }
39 | ```
40 |
--------------------------------------------------------------------------------
/docs/admob/error-handling.md:
--------------------------------------------------------------------------------
1 | # Error Handling
2 |
3 | Errors returned from Admob are always returned as a JavaScript [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) containing a code and message.
4 |
5 | | code | message |
6 | | --------------------------------- | ------------------------------------------------------------------------------------------------------------ |
7 | | admob/error-code-internal-error | Something happened internally; for instance, an invalid response was received from the ad server. |
8 | | admob/error-code-invalid-request | The ad request was invalid; for instance, the ad unit ID was incorrect. |
9 | | admob/error-code-network-error | The ad request was unsuccessful due to network connectivity. |
10 | | admob/error-code-no-fill | The ad request was successful, but no ad was returned due to lack of ad inventory. |
11 | | admob/os-version-too-low | The current device’s OS is below the minimum required version. |
12 |
--------------------------------------------------------------------------------
/docs/auth/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the pod
6 |
7 | Add the following to your `Podfile`:
8 |
9 | ```ruby
10 | pod 'Firebase/Auth', '~> {{ ios.firebase.auth }}'
11 | ```
12 |
13 | Run `pod update`.
14 |
15 | ## Optional: authenticate with phone number
16 |
17 | ### Enable Phone Number sign-in for your Firebase project
18 |
19 | To sign in users by SMS, you must first enable the Phone Number sign-in method for your Firebase project:
20 |
21 | - In the Firebase console, open the `Authentication` section.
22 | - On the `Sign-in` Method page, enable the `Phone Number` sign-in method.
23 |
24 | More details: [Firebase-phone-auth](https://firebase.google.com/docs/auth/ios/phone-auth)
25 |
26 | ### Enable app verification
27 |
28 | Phone authentication leaves you 2 choices:
29 | - Silent APNs notifications
30 | - reCAPTCHA verification
31 |
32 | Please read carefully and follow Firebase related documentation to complete this step [Firebase-phone-auth](https://firebase.google.com/docs/auth/ios/phone-auth) otherwise app verification will throw an error.
33 |
34 | ?> If you plan to make use of email sign-in links then you'll also need to follow the [Dynamic Links for iOS installation guide](version /links/ios).
35 |
--------------------------------------------------------------------------------
/docs/auth/reference/ActionCodeInfo.md:
--------------------------------------------------------------------------------
1 | # ActionCodeInfo
2 |
3 | A response from [ref auth#checkActionCode].
4 |
5 | ## Properties
6 |
7 | ### data
8 | [method]data returns Object;[/method]
9 |
10 | The data associated with the action code.
11 |
12 | For the `PASSWORD_RESET`, `EMAIL_SIGNIN`, `VERIFY_EMAIL`, and `RECOVER_EMAIL` actions, this object contains an `email` field with the address the email was sent to.
13 |
14 | For the `RECOVER_EMAIL` action, which allows a user to undo an email address change, this object also contains a `fromEmail` field with the user account's new email address. After the action completes, the user's email address will revert to the value in the `email` field from the value in `fromEmail` field.
15 |
16 | ```js
17 | {
18 | email: string,
19 | fromEmail: string,
20 | }
21 | ```
22 |
23 | ### operation
24 | [method]operation returns string;[/method]
25 |
26 | The type of operation that generated the action code. This could be:
27 |
28 | - `PASSWORD_RESET`: password reset code generated via [ref auth.Auth#sendPasswordResetEmail].
29 | - `VERIFY_EMAIL`: email verification code generated via [ref auth.User#sendEmailVerification].
30 | - `RECOVER_EMAIL`: email change revocation code generated via [ref auth.User#updateEmail].
31 | - `EMAIL_SIGNIN`: email sign-in code generated via [ref auth.Auth#sendSignInLinkToEmail].
32 |
--------------------------------------------------------------------------------
/docs/invites/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup) and the [dynamic links setup guide](version /links/android).
4 |
5 | ### Find your SHA fingerprint
6 | Ensure you have SHA fingerprint added in your Firebase console, under the `General settings` tab otherwise you will a receive a `Message failed to send` error.
7 |
8 | E.g. for debug: run keytool command in your terminal
9 |
10 | ```bash
11 | $ keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
12 | ```
13 |
14 | ## Install the RNFirebase Invites package
15 |
16 | Add the `RNFirebaseInvitesPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
17 |
18 | ```java
19 | // ...
20 | import io.invertase.firebase.RNFirebasePackage;
21 | import io.invertase.firebase.invites.RNFirebaseInvitesPackage; // <-- Add this line
22 |
23 | public class MainApplication extends Application implements ReactApplication {
24 | // ...
25 |
26 | @Override
27 | protected List getPackages() {
28 | return Arrays.asList(
29 | new MainReactPackage(),
30 | new RNFirebasePackage(),
31 | new RNFirebaseInvitesPackage() // <-- Add this line
32 | );
33 | }
34 | };
35 | // ...
36 | }
37 | ```
38 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache-2.0 License:
2 | ------------------
3 |
4 | Copyright (c) 2016-present Invertase Limited
5 |
6 | Licensed under the Apache License, Version 2.0 (the "License");
7 | you may not use this library except in compliance with the License.
8 |
9 | You may obtain a copy of the Apache-2.0 License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 |
19 |
20 | Creative Commons Attribution 3.0 License
21 | ----------------------------------------
22 |
23 | Copyright (c) 2016-present Invertase Limited
24 |
25 | Documentation and other instructional materials provided for this project
26 | (including on a separate documentation repository or it's documentation website) are
27 | licensed under the Creative Commons Attribution 3.0 License. Code samples/blocks
28 | contained therein are licensed under the Apache License, Version 2.0 (the "License"), as above.
29 |
30 | You may obtain a copy of the Creative Commons Attribution 3.0 License at
31 |
32 | https://creativecommons.org/licenses/by/3.0/
33 |
--------------------------------------------------------------------------------
/docs/firestore/reference/DocumentSnapshot.md:
--------------------------------------------------------------------------------
1 | # DocumentSnapshot
2 |
3 | A DocumentSnapshot contains data read from a document in your Cloud Firestore database. The data can be extracted with `.data()` or `.get()` to get a specific field.
4 |
5 | ## Properties
6 |
7 | ### exists
8 | [method]exists returns boolean;[/method]
9 |
10 | Property of the DocumentSnapshot that signals whether or not the data exists. True if the document exists.
11 |
12 | ### id
13 | [method]id returns string;[/method]
14 |
15 | Property of the DocumentSnapshot that provides the document's ID.
16 |
17 | ### metadata
18 | [method]metadata returns [ref firestore.SnapshotMetadata];[/method]
19 |
20 | Metadata about the DocumentSnapshot, including information about its source and local modifications.
21 |
22 | ### ref
23 | [method]ref returns [ref firestore.DocumentReference];[/method]
24 |
25 | The DocumentReference for the document included in the DocumentSnapshot.
26 |
27 | ## Methods
28 |
29 | ### data
30 | [method]data() returns Object;[/method]
31 |
32 | Retrieves all fields in the document as an object.
33 |
34 | ### get
35 | [method]get(fieldPath) returns any type or undefined;[/method]
36 |
37 | | Parameter | |
38 | | --------- | ------- |
39 | | fieldPath | **string** or **[ref firestore.FieldPath]** The path (e.g. 'foo' or 'foo.bar') to a specific field. |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/docs/firestore/reference/SnapshotError.md:
--------------------------------------------------------------------------------
1 | # SnapshotError
2 |
3 | SnapshotError represents an Error returned from either [ref firestore.DocumentReference#onSnapshot] or [ref firestore.CollectionReference#onSnapshot].
4 |
5 | ```ts
6 | type SnapshotError implements NativeError extends Error {
7 | +code: string;
8 | +message: string;
9 | +path: string;
10 | +appName: string;
11 | +nativeErrorCode: string | number;
12 | +nativeErrorMessage: string;
13 | }
14 | ```
15 |
16 | ----
17 |
18 | ## Properties
19 |
20 | ### code
21 | [method]code returns string;[/method]
22 |
23 | A standard Firebase Web SDK Firestore error code.
24 |
25 | ### message
26 | [method]message returns string;[/method]
27 |
28 | A standard Firebase Web SDK Firestore error message.
29 |
30 | ### path
31 | [method]path returns string;[/method]
32 |
33 | The path to the collection or document the error occurred on.
34 |
35 | ### appName
36 | [method]appName returns string;[/method]
37 |
38 | The app name for the instance the error occurred on, e.g. `[DEFAULT]`.
39 |
40 | ### nativeErrorCode
41 | [method]path returns string | number;[/method]
42 |
43 | The native error code generated by the native Firebase SDK for Android or iOS.
44 |
45 | ### nativeErrorMessage
46 | [method]path returns string;[/method]
47 |
48 | The native error message generated by the native Firebase SDK for Android or iOS.
49 |
--------------------------------------------------------------------------------
/docs/links/reference/AndroidParameters.md:
--------------------------------------------------------------------------------
1 | # AndroidParameters
2 |
3 | Android specific link settings.
4 |
5 | ## Methods
6 |
7 | ### setFallbackUrl
8 | [method]setFallbackUrl(fallbackUrl) returns [ref links.DynamicLink];[/method]
9 |
10 | Sets the link to open when the app isn't installed. Specify this to do something other than install your app from the Play Store when the app isn't installed, such as open the mobile web version of the content, or display a promotional page for your app.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | fallbackUrl | **string** The link to open on Android if the app is not installed. |
15 |
16 | ### setMinimumVersion
17 | [method]setMinimumVersion(minimumVersion) returns [ref links.DynamicLink];[/method]
18 |
19 | Sets the versionCode of the minimum version of your app that can open the link.
20 |
21 | | Parameter | |
22 | | --------- | ------- |
23 | | minimumVersion | **number** The minimum version. |
24 |
25 | ### setPackageName
26 | [method]setPackageName(packageName) returns [ref links.DynamicLink];[/method]
27 |
28 | Sets the Android package name.
29 |
30 | | Parameter | |
31 | | --------- | ------- |
32 | | packageName | **string** The package name of the Android app to use to open the link. The app must be connected to your project from the Overview page of the Firebase console. |
33 |
--------------------------------------------------------------------------------
/docs/troubleshooting/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Troubleshooting
2 |
3 | ## Failing to recognize the GoogleService-Info.plist
4 |
5 | If the `GoogleService-Info.plist` is not registered with XCode, your app will crash right after starting. You can verify the file is not registered if you open your project in Xcode and don't see the file in your app's directory listing.
6 |
7 | To fix this, first make sure your `GoogleService-Info.plist` from google is present in the `YOUR_APP/ios` directory. Next open Xcode and open the folder tab and then open your project. You should see the `AppDelegate.h` file and other important files. Right click on your project and click on the option that says "Add Files to YOUR_APP". Select `GoogleService-Info.plist`. You should now see it in your project. Finally, rebuild your app.
8 |
9 |
10 | ## Duplicate Symbols / Undefined Symbols (build time error)
11 |
12 | Unfortunately, XCode can get in a bit of a mess every now and again, particularly when updating to new versions of `react-native-firebase` or the Firebase pods. If you get a Duplicate Symbols or Undefined Symbols error then you're likely to need to do a proper clean of your workspace.
13 |
14 | To do this, try the following in xcode:
15 |
16 | ```javascript
17 | 1) Do product > clean
18 | 2) Close Xcode
19 | 3) Re-run pod install (from the command line)
20 | 4) Re-open the .xcworkspace
21 | 5) Do product > clean
22 | 6) Try a build
23 | ```
24 |
--------------------------------------------------------------------------------
/docs/admob/sizes.md:
--------------------------------------------------------------------------------
1 | # Sizes
2 |
3 | Sets the size of an Advert. Can be one of the following or a custom size:
4 |
5 | | Size | Description |
6 | | ----------------- | ------------------------------------------------------------------------------------------------------ |
7 | | BANNER | Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels). |
8 | | FULL_BANNER | Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels). |
9 | | LARGE_BANNER | Large banner ad size (320x100 density-independent pixels). |
10 | | LEADERBOARD | Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels). |
11 | | MEDIUM_RECTANGLE | Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels). |
12 | | SMART_BANNER | A dynamically sized banner that is full-width and auto-height. |
13 |
14 | To specify a custom size, pass a string with the width and height split by an "x" (follows the Regex pattern `([0-9]+)x([0-9]+)`), e.g 320x150
15 |
16 | !> Requesting an advert with a size which does not exist on the AdMob servers will return `admob/error-code-internal-error`.
17 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidImportance.md:
--------------------------------------------------------------------------------
1 | # AndroidImportance
2 |
3 | ```
4 | firebase.notifications.Android.Importance
5 | ```
6 |
7 | ## Constants
8 |
9 | ### Default
10 |
11 | Default notification importance: shows everywhere, makes noise, but does not visually intrude.
12 |
13 | ```
14 | firebase.notifications.Android.Importance.Default
15 | ```
16 |
17 | ### High
18 |
19 | Higher notification importance: shows everywhere, makes noise and peeks. May use full screen intents.
20 |
21 | ```
22 | firebase.notifications.Android.Importance.High
23 | ```
24 |
25 | ### Low
26 |
27 | Low notification importance: shows everywhere, but is not intrusive.
28 |
29 | ```
30 | firebase.notifications.Android.Importance.Low
31 | ```
32 |
33 | ### Max
34 |
35 | Unused.
36 |
37 | ```
38 | firebase.notifications.Android.Importance.Max
39 | ```
40 |
41 | ### Min
42 |
43 | Min notification importance: only shows in the shade, below the fold.
44 |
45 | ```
46 | firebase.notifications.Android.Importance.Min
47 | ```
48 |
49 | ### None
50 |
51 | A notification with no importance: does not show in the shade.
52 |
53 | ```
54 | firebase.notifications.Android.Importance.None
55 | ```
56 |
57 | ### Unspecified
58 |
59 | Value signifying that the user has not expressed an importance. This value is for persisting preferences, and should never be associated with an actual notification.
60 |
61 | ```
62 | firebase.notifications.Android.Importance.Unspecified
63 | ```
--------------------------------------------------------------------------------
/docs/firestore/reference/Settings.md:
--------------------------------------------------------------------------------
1 | # Settings
2 |
3 | Specifies custom configurations for your Cloud Firestore instance. You must set these before invoking any other methods.
4 |
5 | ## Properties
6 |
7 | ### host
8 | [method]host returns nullable boolean;[/method]
9 |
10 | The hostname to connect to.
11 |
12 | ### persistence
13 | [method]persistence returns nullable boolean;[/method]
14 |
15 | Whether to use persistence.
16 |
17 | ### ssl
18 | [method]ssl returns nullable boolean;[/method]
19 |
20 | Whether to use SSL when connecting.
21 |
22 | ## Unsupported Properties
23 |
24 | ### timestampsInSnapshots
25 | [method]timestampsInSnapshots returns nullable boolean;[/method]
26 |
27 | !> Currently will have no effect, as it is not supported on both iOS and Android.
28 |
29 | Enables the use of `Timestamp`s for timestamp fields in `DocumentSnapshot`s.
30 |
31 | Currently, Firestore returns timestamp fields as `Date` but `Date` only supports millisecond precision, which leads to truncation and causes unexpected behavior when using a timestamp from a snapshot as a part of a subsequent query.
32 |
33 | Setting `timestampsInSnapshots` to true will cause Firestore to return `Timestamp` values instead of `Date` avoiding this kind of problem. To make this work you must also change any code that uses `Date` to use `Timestamp` instead.
34 |
35 | NOTE: in the future `timestampsInSnapshots: true` will become the default and this option will be removed so you should change your code to use Timestamp now and opt-in to this new behavior as soon as you can.
--------------------------------------------------------------------------------
/docs/core/reference/core.md:
--------------------------------------------------------------------------------
1 | # Core
2 |
3 | ## Methods
4 |
5 | ### initializeApp
6 | [method]initializeApp(options, name) returns [ref core.App];[/method]
7 |
8 | Initializes a new [ref core.App] instance.
9 |
10 | [collapse Parameters]
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | options | **Object** |
15 | | name | **string** |
16 |
17 | | Options | |
18 | | --------- | ------- |
19 | | apiKey | **string** |
20 | | appId | **string** |
21 | | databaseURL | **string** |
22 | | messagingSenderId | **string** |
23 | | projectId | **string** |
24 | | storageBucket | **string** |
25 |
26 | [/collapse]
27 |
28 | ### app
29 | [method]app(name) returns [ref core.App];[/method]
30 |
31 | Returns a [ref core.App] instance by name.
32 |
33 | [collapse Parameters]
34 |
35 | | Parameter | |
36 | | --------- | ------- |
37 | | name | **string** (optional) Returns the default app instance if no value. |
38 |
39 | [/collapse]
40 |
41 |
42 | ### setLogLevel
43 | [method]setLogLevel(level) returns void;[/method]
44 |
45 | Set the global logging level for all logs.
46 |
47 | [collapse Parameters]
48 |
49 | | Parameter | |
50 | | --------- | ------- |
51 | | level | **string** or **boolean** |
52 |
53 | [/collapse]
54 |
55 | ## Properties
56 |
57 | ### apps
58 |
59 | [method]apps returns Array of [ref core.App];[/method]
60 |
61 | Returns all initilized apps.
62 |
63 | ### SDK_VERSION
64 |
65 | [method]SDK_VERSION returns string;[/method]
66 |
67 | The current SDK version.
68 |
69 |
70 |
--------------------------------------------------------------------------------
/docs/core/default-app.md:
--------------------------------------------------------------------------------
1 | ## Default Firebase App
2 |
3 | After following the iOS & Android install guides and correctly setting up your google services plist/json files; the default app is automatically initialized and available for use in react-native-firebase.
4 |
5 | There's no need to call `initializeApp(opt)` in your JS code for the default app, import RNFirebase and use the default app straight away:
6 |
7 | ```javascript
8 | import firebase from 'react-native-firebase';
9 |
10 | console.log(firebase.database().app.name); // '[DEFAULT]'
11 | ```
12 |
13 | !> Calling `initializeApp()` for the default app will throw an 'app already initialized' error in a later release.
14 |
15 | ## Enable Database Persistence
16 |
17 | Enabling database persistence (setPersistence) via JS for the default app is no longer supported. This breaking change was made in v3.0.0 to avoid race condition issues.
18 |
19 | You can still however easily enable this natively for the default app instance:
20 |
21 | ### Android
22 |
23 | Add `FirebaseDatabase.getInstance().setPersistenceEnabled(true);` inside your `MainApplication.java` files `onCreate()` method.
24 |
25 | You also need to explicitly add the `FirebaseDatabase` import with the rest of the imports near the top of your `MainApplication.java` file:
26 |
27 | ```java
28 | import com.google.firebase.database.FirebaseDatabase;
29 | ```
30 |
31 | ### iOS
32 |
33 | Add `[FIRDatabase database].persistenceEnabled = YES;` after the `[FIRApp configure];` line inside your `AppDelegate.m` files `didFinishLaunchingWithOptions` method.
34 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidPriority.md:
--------------------------------------------------------------------------------
1 | # AndroidPriority
2 |
3 | ```
4 | firebase.notifications.Android.Priority
5 | ```
6 |
7 | ## Constants
8 |
9 | ### Default
10 |
11 | Default notification priority for `setPriority`. If your application does not prioritise its own notifications, use this value for all notifications.
12 |
13 | ```
14 | firebase.notifications.Android.Priority.Default
15 | ```
16 |
17 | ### High
18 |
19 | Higher notification priority for `setPriority`, for more important notifications or alerts. The UI may choose to show these items larger, or at a different position in notification lists, compared with your app's `Priority.Default` items.
20 |
21 | ```
22 | firebase.notifications.Android.Priority.High
23 | ```
24 |
25 | ### Low
26 |
27 | Lower notification priority for `setPriority`, for items that are less important. The UI may choose to show these items smaller, or at a different position in the list, compared with your app's `Priority.Default` items.
28 |
29 | ```
30 | firebase.notifications.Android.Priority.Low
31 | ```
32 |
33 | ### Max
34 |
35 | Highest notification priority for `setPriority`, for your application's most important items that require the user's prompt attention or input.
36 |
37 | ```
38 | firebase.notifications.Android.Priority.Max
39 | ```
40 |
41 | ### Min
42 |
43 | Lowest notification priority for `setPriority`; these items might not be shown to the user except under special circumstances, such as detailed notification logs.
44 |
45 | ```
46 | firebase.notifications.Android.Priority.Min
47 | ```
--------------------------------------------------------------------------------
/docs/firestore/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the dependency
6 |
7 | Add the Firebase Firestore dependency to `android/app/build.gradle`:
8 |
9 | ```groovy
10 | dependencies {
11 | // ...
12 | implementation "com.google.firebase:firebase-firestore:{{ android.firebase.firestore }}"
13 | }
14 | ```
15 |
16 | ## Install the RNFirebase Firestore package
17 |
18 | Add the `RNFirebaseFirestorePackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
19 |
20 | ```java
21 | // ...
22 | import io.invertase.firebase.RNFirebasePackage;
23 | import io.invertase.firebase.firestore.RNFirebaseFirestorePackage; // <-- Add this line
24 |
25 | public class MainApplication extends Application implements ReactApplication {
26 | // ...
27 |
28 | @Override
29 | protected List getPackages() {
30 | return Arrays.asList(
31 | new MainReactPackage(),
32 | new RNFirebasePackage(),
33 | new RNFirebaseFirestorePackage() // <-- Add this line
34 | );
35 | }
36 | };
37 | // ...
38 | }
39 | ```
40 |
41 | ## Enable multidex
42 |
43 | Adding Firestore to your Android app requires [`multiDexEnabled` to be set to `true`](https://developer.android.com/studio/build/multidex) in `android/app/build.gradle`:
44 |
45 | ```java
46 | //..
47 | android {
48 | //..
49 |
50 | defaultConfig {
51 | //..
52 | multiDexEnabled true // needed for firestore:
53 | }
54 | //..
55 | }
56 | ```
57 |
--------------------------------------------------------------------------------
/docs/notifications/reference/IOSNotifications.md:
--------------------------------------------------------------------------------
1 | # IOSNotifications
2 |
3 | This deals with iOS-specific Notification functionality.
4 |
5 |
6 | ## Properties
7 |
8 | ### shouldAutoComplete
9 | [method]shouldAutoComplete returns boolean;[/method]
10 |
11 | Controls whether notifications are automatically completed.
12 |
13 | If `true` then the notification is immediately completed with the assumed value of `backgroundFetchResult.noData` and [ref notifications.IOSNofication]'s `complete` function is `undefined`.
14 |
15 | If `false` then you must handle notification completion manually via [ref notifications.IOSNotification]'s `complete` function.
16 |
17 | > See the native [application:didReceiveRemoteNotification:fetchCompletionHandler:](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application?language=objc) method for more details on iOS notification completion.
18 |
19 | ### backgroundFetchResult
20 | [method]backgroundFetchResult returns Object;[/method]
21 |
22 | Returns an object with keys `noData`, `newData` and `failure`. The value for one of these keys should be used when calling [ref notifications.IOSNotification#complete].
23 |
24 | [example Example]
25 | ```javascript
26 | const newDataResult = firebase.notifications().ios.backgroundFetchResult.newData;
27 | notification.ios.complete(newDataResult);
28 | ```
29 | [/example]
30 |
31 | > See the native [application:didReceiveRemoteNotification:fetchCompletionHandler:](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application?language=objc) method for more details on iOS notification completion.
--------------------------------------------------------------------------------
/docs/firestore/reference/QuerySnapshot.md:
--------------------------------------------------------------------------------
1 | # QuerySnapshot
2 |
3 | A QuerySnapshot contains zero or more DocumentSnapshot objects representing the results of a query. The documents can be accessed as an array via the docs property or enumerated using the forEach method. The number of documents can be determined via the empty and size properties.
4 |
5 | ## Properties
6 |
7 | ### docChanges
8 | [method]docChanges returns Array of [ref firestore.DocumentChange];[/method]
9 |
10 | An array of the documents that changed since the last snapshot. If this is the first snapshot, all documents will be in the list as added changes.
11 |
12 | ### docs
13 | [method]docs returns Array of [ref firestore.DocumentSnapshot];[/method]
14 |
15 | An array of all the documents in the QuerySnapshot.
16 |
17 | ### empty
18 | [method]empty returns boolean;[/method]
19 |
20 | True if there are no documents in the QuerySnapshot.
21 |
22 | ### metadata
23 | [method]metadata returns [ref firestore.SnapshotMetadata];[/method]
24 |
25 | Metadata about this snapshot, concerning its source and if it has local modifications.
26 |
27 | ### query
28 | [method]query returns [ref firestore.Query];[/method]
29 |
30 | The query you called get or onSnapshot on to get the QuerySnapshot.
31 |
32 | ### size
33 | [method]size returns number;[/method]
34 |
35 | The number of documents in the QuerySnapshot.
36 |
37 | ## Methods
38 |
39 | ### forEach
40 | [method]forEach(callback) returns void;[/method]
41 |
42 | Enumerates all of the documents in the QuerySnapshot.
43 |
44 | | Parameter | |
45 | | --------- | ------- |
46 | | callback | **function([ref firestore.DataSnapshot])** |
47 |
--------------------------------------------------------------------------------
/docs/firestore/reference/Blob.md:
--------------------------------------------------------------------------------
1 | # Blob
2 |
3 | ```
4 | firebase.firestore.Blob
5 | ```
6 |
7 | ## Static Methods
8 |
9 | ### fromBase64String
10 | [method]fromBase64String(base64) returns [ref firestore.Blob];[/method]
11 |
12 | Creates a new Blob from the given Base64 string, converting it to bytes.
13 |
14 | | Parameter | |
15 | | --------- | ------- |
16 | | base64 | **string** The Base64 string used to create the Blob object.|
17 |
18 | [collapse Example]
19 | ```js
20 | firebase.firestore.Blob.fromBase64String(base64string);
21 | ```
22 | [/collapse]
23 |
24 | ### fromUint8Array
25 | [method]fromUint8Array(array) returns [ref firestore.Blob];[/method]
26 |
27 | Creates a new Blob from the given Uint8Array.
28 |
29 | | Parameter | |
30 | | --------- | ------- |
31 | | array | **Uint8Array** The Uint8Array used to create the Blob object. Value must not be null.|
32 |
33 | [collapse Example]
34 | ```js
35 | firebase.firestore.Blob.fromUint8Array(uint8Array);
36 | ```
37 | [/collapse]
38 |
39 | ## Methods
40 |
41 | ### isEqual
42 | [methods]isEqual(other) returns [ref firestore.Blob];[/methods]
43 |
44 | Returns 'true' if this Blob is equal to the provided one.
45 |
46 | | Parameter | |
47 | | --------- | ------- |
48 | | other | **[ref firestore.Blob]** The **Blob** to compare against. Value must not be null.|
49 |
50 | ### toBase64
51 | [methods]toBase64() returns string;[/methods]
52 |
53 | Returns the bytes of a Blob as a Base64-encoded string.
54 |
55 | ### toUint8Array
56 | [methods]toBase64() returns Uint8Array;[/methods]
57 |
58 | Returns the bytes of a Blob in a new Uint8Array.
59 |
--------------------------------------------------------------------------------
/docs/iid/reference/iid.md:
--------------------------------------------------------------------------------
1 | # Instance ID
2 |
3 | ```
4 | firebase.iid
5 | ```
6 |
7 | ## Methods
8 |
9 | The following methods are accessed via the Instance ID instance: `firebase.iid()`.
10 |
11 | ### get
12 | [method]get() returns Promise containing string;[/method]
13 |
14 | Get the current Instance ID.
15 |
16 | ### delete
17 | [method]delete() returns Promise containing void;[/method]
18 |
19 | Delete the current Instance ID.
20 |
21 | ### getToken
22 | [method]getToken(authorizedEntity?: string, scope?: string) returns Promise containing string;[/method]
23 |
24 | Get a token that authorizes an Entity to perform an action on behalf of the application identified by Instance ID.
25 |
26 | Returns a promise that resolves with the token if successful, otherwise rejects with an error.
27 |
28 | | Parameter | |
29 | | --------- | ------- |
30 | | authorizedEntity | Entity authorized by the token. **Defaults to:** `firebase.iid().app.options.messagingSenderId;` |
31 | | scope | Action authorized for authorizedEntity. **Defaults to:** `*` |
32 |
33 | ### deleteToken
34 | [method]deleteToken(authorizedEntity?: string, scope?: string) returns Promise containing void;[/method]
35 |
36 | Revokes access to a scope (action) for an entity previously authorized by getToken().
37 |
38 | Returns a promise that resolves with null if successful, otherwise rejects with an error.
39 |
40 | | Parameter | |
41 | | --------- | ------- |
42 | | authorizedEntity | Entity authorized by the token. **Defaults to:** `firebase.iid().app.options.messagingSenderId;` |
43 | | scope | Action authorized for authorizedEntity. **Defaults to:** `*` |
44 |
--------------------------------------------------------------------------------
/docs/messaging/device-token.md:
--------------------------------------------------------------------------------
1 | # The Device Registration Token
2 |
3 | On initial startup of your app, the FCM SDK generates a registration token for the client app instance. This token is needed to be able to send FCM messages and notifications to the user's device.
4 |
5 | This section describes how to retrieve the token and how to monitor changes to the token. Because the token could be rotated after initial startup, you are strongly recommended to monitor for the latest updated registration token.
6 |
7 | The registration token may change when:
8 |
9 | - The app deletes Instance ID
10 | - The app is restored on a new device
11 | - The user uninstalls/reinstall the app
12 | - The user clears app data.
13 |
14 | ## 1) Retrieve the current registration token
15 |
16 | ```js
17 | const fcmToken = await firebase.messaging().getToken();
18 | if (fcmToken) {
19 | // user has a device token
20 | } else {
21 | // user doesn't have a device token yet
22 | }
23 | ```
24 |
25 | or:
26 |
27 | ```js
28 | firebase.messaging().getToken()
29 | .then(fcmToken => {
30 | if (fcmToken) {
31 | // user has a device token
32 | } else {
33 | // user doesn't have a device token yet
34 | }
35 | });
36 | ```
37 |
38 | ## 2) Monitor token generation
39 |
40 | The `onTokenRefresh` callback fires with the latest registration token whenever a new token is generated.
41 |
42 | ```js
43 | componentDidMount() {
44 | this.onTokenRefreshListener = firebase.messaging().onTokenRefresh(fcmToken => {
45 | // Process your token as required
46 | });
47 | }
48 |
49 | componentWillUnmount() {
50 | this.onTokenRefreshListener();
51 | }
52 | ```
53 |
--------------------------------------------------------------------------------
/docs/auth/reference/IdTokenResult.md:
--------------------------------------------------------------------------------
1 | # IdTokenResult
2 |
3 | Interface representing an ID token result obtained from [ref auth.User#getIdTokenResult].
4 |
5 | It contains the ID token JWT string and other helper properties for getting different data
6 | associated with the token as well as all the decoded payload claims.
7 |
8 | ?> Note that these claims are not to be trusted as they are parsed client side. Only server side verification can guarantee the integrity of the token claims.
9 |
10 | ## Properties
11 |
12 | ### authTime
13 | [method]authTime returns string;[/method]
14 |
15 | The authentication time as a ISO 8601 UTC Date string. This is the time the user authenticated (signed in) and not the time the token was refreshed.
16 |
17 | ### claims
18 | [method]claims returns non-null Object;[/method]
19 |
20 | The entire payload claims of the token including reserved claims and custom claims.
21 |
22 | ### expirationTime
23 | [method]expirationTime returns string;[/method]
24 |
25 | The token expiration time formatted as a ISO 8601 UTC Date string.
26 |
27 | ### issuedAtTime
28 | [method]issuedAtTime returns string;[/method]
29 |
30 | The token issued at time formatted as a ISO 8601 UTC Date string.
31 |
32 | ### signInProvider
33 | [method]signInProvider returns nullable string;[/method]
34 |
35 | The sign-in provider which the token was obtained with, e.g. anonymous, custom, phone, password, etc.
36 |
37 | > Note, this does not map to provider IDs.
38 |
39 | ### token
40 | [method]token returns string;[/method]
41 |
42 | The Firebase JWT string.
43 |
44 | ----
45 |
46 | **Source**: https://firebase.google.com/docs/reference/js/firebase.auth.IdTokenResult
47 |
--------------------------------------------------------------------------------
/docs/notifications/android-channels.md:
--------------------------------------------------------------------------------
1 | # Android Notification Channels
2 |
3 | As of Android 8.0 (API Level 26), notifications must specify a [Notification Channel](https://developer.android.com/guide/topics/ui/notifiers/notifications.html#ManageChannels) or they will not appear.
4 |
5 | To allow React Native Firebase to work seamlessly across all versions of Android, you will need to create a channel before you can display a notification. This block of code can be re-run multiple times, so it is safe to do it each time your application starts.
6 |
7 | ## Creating a Notification Channel
8 |
9 | ```js
10 | // Build a channel
11 | const channel = new firebase.notifications.Android.Channel('test-channel', 'Test Channel', firebase.notifications.Android.Importance.Max)
12 | .setDescription('My apps test channel');
13 |
14 | // Create the channel
15 | firebase.notifications().android.createChannel(channel);
16 | ```
17 |
18 | For full reference documentation, please see [ref notifications.AndroidChannel] and [ref notifications.AndroidNotifications].
19 |
20 | ## Creating a Notification Channel Group
21 |
22 | React Native Firebase also supports the concept of [Notification Channel Groups](https://developer.android.com/training/notify-user/channels.html#CreateChannelGroup).
23 |
24 | ```js
25 | // Build a channel group
26 | const channelGroup = new firebase.notifications.Android.ChannelGroup('test-group', 'Test Channel Group');
27 |
28 | // Create the channel group
29 | firebase.notifications().android.createChannelGroup(channelGroup);
30 | ```
31 |
32 | For full reference documentation, please see [ref notifications.AndroidChannelGroup] and [ref notifications.AndroidNotifications].
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidGroupAlert.md:
--------------------------------------------------------------------------------
1 | # AndroidGroupAlert
2 |
3 | ```
4 | firebase.notifications.Android.GroupAlert
5 | ```
6 |
7 | ## Constants
8 |
9 | ### All
10 |
11 | Constant for `setGroupAlertBehaviour`, meaning that all notifications in a group with sound or vibration ought to make sound or vibrate (respectively), so this notification will not be muted when it is in a group.
12 |
13 | ```
14 | firebase.notifications.Android.GroupAlert.All
15 | ```
16 |
17 | ### Children
18 |
19 | Constant for `setGroupAlertBehaviour`, meaning that the summary notification in a group should be silenced (no sound or vibration) even if they would otherwise make sound or vibrate. Use this constant to mute this notification if this notification is a group summary.
20 |
21 | For example, you might want to use this constant if only the children notifications in your group have content and the summary is only used to visually group notifications rather than to alert the user that new information is available.
22 |
23 | ```
24 | firebase.notifications.Android.GroupAlert.Children
25 | ```
26 |
27 | ### Summary
28 |
29 | Constant for `setGroupAlertBehaviour`, meaning that all children notification in a group should be silenced (no sound or vibration) even if they would otherwise make sound or vibrate. Use this constant to mute this notification if this notification is a group child. This must be applied to all children notifications you want to mute.
30 |
31 | For example, you might want to use this constant if you post a number of children notifications at once (say, after a periodic sync), and only need to notify the user audibly once.
32 |
33 | ```
34 | firebase.notifications.Android.GroupAlert.Summary
35 | ```
--------------------------------------------------------------------------------
/docs/links/reference/AnalyticsParameters.md:
--------------------------------------------------------------------------------
1 | # AnalyticsParameters
2 |
3 | Google Analytics specific link settings.
4 |
5 | ## Methods
6 |
7 | ### setCampaign
8 | [method]setCampaign(campaign) returns [ref links.DynamicLink];[/method]
9 |
10 | Sets the campaign name.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | campaign | **string** The campaign name; The individual campaign name, slogan, promo code, etc. for a product. |
15 |
16 | ### setContent
17 | [method]setContent(content) returns [ref links.DynamicLink];[/method]
18 |
19 | Sets the campaign content.
20 |
21 | | Parameter | |
22 | | --------- | ------- |
23 | | content | **string** The campaign content; used for A/B testing and content-targeted ads to differentiate ads or links that point to the same URL. |
24 |
25 | ### setMedium
26 | [method]setMedium(medium) returns [ref links.DynamicLink];[/method]
27 |
28 | Sets the campaign medium.
29 |
30 | | Parameter | |
31 | | --------- | ------- |
32 | | medium | **string** The campaign medium; used to identify a medium such as email or cost-per-click (cpc). |
33 |
34 | ### setSource
35 | [method]setSource(source) returns [ref links.DynamicLink];[/method]
36 |
37 | Sets the campaign source.
38 |
39 | | Parameter | |
40 | | --------- | ------- |
41 | | source | **string** The campaign source; used to identify a search engine, newsletter, or other source. |
42 |
43 | ### setTerm
44 | [method]setTerm(term) returns [ref links.DynamicLink];[/method]
45 |
46 | Sets the campaign term.
47 |
48 | | Parameter | |
49 | | --------- | ------- |
50 | | term | **string** The campaign term; used with paid search to supply the keywords for ads. |
51 |
--------------------------------------------------------------------------------
/docs/perf-mon/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the dependency
6 |
7 | Add the Firebase Performance Monitoring dependency to `android/app/build.gradle`:
8 |
9 | ```groovy
10 | dependencies {
11 | // ...
12 | implementation "com.google.firebase:firebase-perf:{{ android.firebase.perf }}"
13 | }
14 | ```
15 |
16 | Performance Monitoring also requires the Firebase Plugins dependency. In your projects `android/build.gradle` file, add the plugin to your dependencies:
17 |
18 | ```groovy
19 | dependencies {
20 | // ...
21 | classpath 'com.google.firebase:firebase-plugins:{{ android.firebase.plugins }}'
22 | }
23 | ```
24 |
25 | At the top of your `android/app/build.gradle` file, below other plugins, apply the `firebase-perf` plugin:
26 |
27 | ```groovy
28 | apply plugin: "com.android.application"
29 | apply plugin: "com.google.firebase.firebase-perf"
30 | ```
31 |
32 | ## Install the RNFirebase Performance package
33 |
34 | Add the `RNFirebasePerformancePackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
35 |
36 | ```java
37 | // ...
38 | import io.invertase.firebase.RNFirebasePackage;
39 | import io.invertase.firebase.perf.RNFirebasePerformancePackage; // <-- Add this line
40 |
41 | public class MainApplication extends Application implements ReactApplication {
42 | // ...
43 |
44 | @Override
45 | protected List getPackages() {
46 | return Arrays.asList(
47 | new MainReactPackage(),
48 | new RNFirebasePackage(),
49 | new RNFirebasePerformancePackage() // <-- Add this line
50 | );
51 | }
52 | };
53 | // ...
54 | }
55 | ```
56 |
--------------------------------------------------------------------------------
/docs/auth/reference/EmailAuthProvider.md:
--------------------------------------------------------------------------------
1 | # EmailAuthProvider
2 |
3 | ```
4 | firebase.auth.EmailAuthProvider
5 | ```
6 |
7 | ## Properties
8 |
9 | ### EMAIL_LINK_SIGN_IN_METHOD
10 | [method]EMAIL_LINK_SIGN_IN_METHOD returns string;[/method]
11 |
12 | This corresponds to the sign-in method identifier as returned in [ref auth.auth#fetchSignInMethodsForEmail].
13 |
14 | ### EMAIL_PASSWORD_SIGN_IN_METHOD
15 | [method]EMAIL_PASSWORD_SIGN_IN_METHOD returns string;[/method]
16 |
17 | This corresponds to the sign-in method identifier as returned in [ref auth.auth#fetchSignInMethodsForEmail].
18 |
19 | ### PROVIDER_ID
20 | [method]PROVIDER_ID returns string;[/method]
21 |
22 | ### providerId
23 | [method]providerId returns string;[/method]
24 |
25 | ## Methods
26 |
27 | ### credential
28 | [method]credential(email, password) returns [ref auth.AuthCredential];[/method]
29 |
30 | | Parameter | |
31 | | --------- | ------- |
32 | | email | **string** Email address. |
33 | | password | **string** User account password. |
34 |
35 | #### Example
36 |
37 | ```js
38 | const credential = firebase.auth.EmailAuthProvider.credential(
39 | email,
40 | password
41 | );
42 | ```
43 |
44 | ### credentialWithLink
45 | [method]credentialWithLink(email, emailLink) returns [ref auth.AuthCredential];[/method]
46 |
47 | Initialize an EmailAuthProvider credential using an email and link.
48 |
49 | > Ensure your link is a valid email sign-in link by calling [ref auth.auth#isSignInWithEmailLink].
50 |
51 | | Parameter | |
52 | | --------- | ------- |
53 | | email | **string** Email address. |
54 | | emailLink | **string** Sign-in email link. |
55 |
56 | #### Example
57 |
58 | ```js
59 | const credential = firebase.auth.EmailAuthProvider.credentialWithLink(
60 | email,
61 | emailLink
62 | );
63 | ```
64 |
--------------------------------------------------------------------------------
/docs/perf-mon/reference/perf-mon.md:
--------------------------------------------------------------------------------
1 | # Performance Monitoring
2 |
3 | ```
4 | firebase.perf
5 | ```
6 |
7 | ?> **Upcoming Change:** Note that this API is likely to change in v5.1.0 to convert all Trace / HttpMetric methods (except start & stop) to be synchronous JS side methods. The API implemented currently is an initial draft to allow early access.
8 |
9 | Firebase Performance Monitoring captures a number of traces automatically, such as all outbound HTTP requests, app boot time and more.
10 |
11 | ## Methods
12 |
13 | The following methods are accessed via the Performance Monitoring instance `firebase.perf()`.
14 |
15 | ### setPerformanceCollectionEnabled
16 | [method]setPerformanceCollectionEnabled(enabled) returns void;[/method]
17 |
18 | Enables or disables performance monitoring.
19 |
20 | | Parameter | |
21 | | --------- | ------- |
22 | | enabled | **boolean** Whether monitoring is enabled or disabled |
23 |
24 | ### newTrace
25 | [method]newTrace(id) returns [ref perf-mon.Trace];[/method]
26 |
27 | Returns a new instance of Trace. The id is the unique name of something you'd like to run performance monitoring against.
28 |
29 | | Parameter | |
30 | | --------- | ------- |
31 | | id | **string** The unique name of the trace to monitor |
32 |
33 | ### newHttpMetric
34 | [method]newHttpMetric(url, method) returns [ref perf-mon.HttpMetric];[/method]
35 |
36 | Returns a new instance of HttpMetric.
37 |
38 | | Parameter | |
39 | | --------- | ------- |
40 | | url | **string** The full URL of the new request |
41 | | method | **string** The HTTP method of the request. One of: GET, PUT, POST, DELETE, HEAD, PATCH, OPTIONS, TRACE, CONNECT |
42 |
43 | ## Classes
44 |
45 | ### Trace
46 |
47 | [ref perf-mon.Trace]
48 |
49 | ### HttpMetric
50 |
51 | [ref perf-mon.HttpMetric]
52 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React Native Firebase Docs
2 |
3 | This repository contains the documentation for the [RNFirebase documentation](https://invertase.io/oss/react-native-firebase).
4 |
5 | ## Internal Links
6 |
7 | Along with the normal markdown linking (`[text](link)`), the following markdown can also be used to make linking easier around the site:
8 |
9 | ### ref
10 |
11 | Creates a link to a module reference file and method under the same version:
12 |
13 | ```
14 | [ref auth] // to /docs//auth/auth/auth
15 | [ref auth#signInWithEmailAndPassword] // to /docs//auth/reference/auth#signInWithEmailAndPassword
16 | [ref auth.User#uid] // to /docs//auth/reference/User#uid
17 | ```
18 |
19 | ### version
20 |
21 | Creates a link to the path on the documentation under the current version:
22 |
23 | ```
24 | [A link](version /auth/getting-started) // to /docs//auth/getting-started
25 | ```
26 |
27 | ## Alerts
28 |
29 | There is 3 types of alert, informational, warning and important:
30 |
31 | ```
32 | > Informational
33 | !> Warning
34 | ?> Error
35 | ```
36 |
37 | ## Headers
38 |
39 | Any headers with either a double or triple hash will appear as linkable, and appear in the table of contents.
40 |
41 | ## Color
42 |
43 | Wrapping text in color tags will wrap it in a span with the given hex code:
44 |
45 | ```
46 | [color #fff]White Text[/color]
47 | [color #000000]Black Text[/color]
48 | ```
49 |
50 | ## Config
51 |
52 | Each version has a custom config file (`_config.yaml`) which is converted . The contents of which will be parsed and flattened. Within the markdown, adding a flattened dot-noted path wrapped in double curly braces will print out the config:
53 |
54 | ```
55 | {
56 | android: {
57 | firebase: {
58 | core: '11.4.2',
59 | },
60 | },
61 | }
62 | ```
63 |
64 | ```
65 | {{ android.firebase.core }} // 11.4.2
66 | ```
67 |
--------------------------------------------------------------------------------
/docs/auth/reference/ActionCodeSettings.md:
--------------------------------------------------------------------------------
1 | # ActionCodeSettings
2 |
3 | This is the interface that defines the required continue/state URL with optional Android and iOS bundle identifiers. The action code setting fields are:
4 |
5 | - `url`: Sets the link continue/state URL, which has different meanings in different contexts:
6 | -- When the link is handled in the web action widgets, this is the deep link in the continueUrl query parameter.
7 | -- When the link is handled in the app directly, this is the continueUrl query parameter in the deep link of the Dynamic Link.
8 | - `iOS`: Sets the iOS bundle ID. This will try to open the link in an iOS app if it is installed.
9 | - `android`: Sets the Android package name. This will try to open the link in an android app if it is installed. If installApp is passed, it specifies whether to install the Android app if the device supports it and the app is not already installed. If this field is provided without a packageName, an error is thrown explaining that the packageName must be provided in conjunction with this field. If minimumVersion is specified, and an older version of the app is installed, the user is taken to the Play Store to upgrade the app.
10 | - `handleCodeInApp`: The default is false. When set to true, the action code link will be be sent as a Universal Link or Android App Link and will be opened by the app if installed. In the false case, the code will be sent to the web widget first and then on continue will redirect to the app if installed.
11 |
12 | ?> `handleCodeInApp` must always be `true` when being used for [ref auth.auth#fetchSignInMethodsForEmail]
13 |
14 | ## Structure
15 |
16 | ```js
17 | {
18 | android: ({
19 | packageName: string,
20 | installApp: (boolean or undefined),
21 | minimumVersion: (string or undefined)
22 | } or undefined),
23 | handleCodeInApp: (boolean or undefined)
24 | iOS: ({
25 | bundleId: string
26 | } or undefined),
27 | url: string,
28 | }
29 | ```
30 |
--------------------------------------------------------------------------------
/docs/messaging/topics.md:
--------------------------------------------------------------------------------
1 | # Topic Messaging
2 |
3 | Based on the publish/subscribe model, FCM topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. You compose topic messages as needed, and FCM handles routing and delivering the message reliably to the right devices.
4 |
5 | For example, users of a local weather forecasting app could opt in to a "severe weather alerts" topic and receive notifications of storms threatening specified areas. Users of a sports app could subscribe to automatic updates in live game scores for their favourite teams.
6 |
7 | Some things to keep in mind about topics:
8 |
9 | - Topic messaging supports unlimited topics and subscriptions for each app.
10 | - Topic messaging is best suited for content such as news, weather, or other publicly available information.
11 | - Topic messages are optimized for throughput rather than latency. For fast, secure delivery to single devices or small groups of devices, target messages to registration tokens, not topics.
12 | - If you need to send messages to multiple devices per user, consider device group messaging for those use cases.
13 |
14 | ## 1) Subscribe the client app to a topic
15 |
16 | Client apps can subscribe to any existing topic, or they can create a new topic. When a client app subscribes to a new topic name (one that does not already exist for your Firebase project), a new topic of that name is created in FCM and any client can subsequently subscribe to it.
17 |
18 | To subscribe to a topic:
19 |
20 | ```js
21 | firebase.messaging().subscribeToTopic(topicName);
22 | ```
23 |
24 | To unsubscribe from a topic:
25 |
26 | ```js
27 | firebase.messaging().unsubscribeFromTopic(topicName);
28 | ```
29 |
30 | ## 2) Receive and handle topic messages
31 |
32 | FCM delivers topic messages in the same way as other downstream messages.
33 |
34 | To receive messages, make use of the `onMessage` method described in [Receiving Messages](version /messaging/receiving-messages).
35 |
--------------------------------------------------------------------------------
/docs/invites/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup) and the [dynamic links setup guide](version /links/ios).
4 |
5 | > On iOS, users must be signed in with their Google Accounts before they can send invitations.
6 |
7 | ## Add the pod
8 |
9 | Add the following to your `Podfile`:
10 |
11 | ```ruby
12 | pod 'Firebase/Invites', '~> {{ ios.firebase.invites }}'
13 | ```
14 |
15 | Run `pod update`.
16 |
17 | ## Update `AppDelegate.m`
18 |
19 | Replace the `RNFirebaseLinks` import with `RNFirebaseInvites` at the top of your `ios/[App Name]/AppDelegate.m`:
20 |
21 | ```objectivec
22 | #import "RNFirebaseInvites.h"
23 | ```
24 |
25 | Replace the `RNFirebaseLinks` methods with `RNFirebaseInvites` as follows:
26 |
27 | ```objectivec
28 | - (BOOL)application:(UIApplication *)application
29 | openURL:(NSURL *)url
30 | options:(NSDictionary *)options {
31 | return [[RNFirebaseInvites instance] application:application openURL:url options:options];
32 | }
33 |
34 | - (BOOL)application:(UIApplication *)application
35 | continueUserActivity:(NSUserActivity *)userActivity
36 | restorationHandler:(void (^)(NSArray *))restorationHandler {
37 | return [[RNFirebaseInvites instance] application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
38 | }
39 | ```
40 |
41 | ## Setup Google Sign-In
42 |
43 | > Take a look at our [social auth guide](version /auth/social-auth) for how to use Google Sign In with `react-native-firebase`.
44 |
45 | To add custom URL schemes to your Xcode project see [this quick tutorial](https://codorial.com/g/invertase/tutorials/ios-xcode-custom-url-scheme/) - the `URL Schemes` is usually your reversed client ID. To find this value, open your `GoogleService-Info.plist` configuration file, and look for the `REVERSED_CLIENT_ID` key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page.
46 |
--------------------------------------------------------------------------------
/docs/links/reference/DynamicLink.md:
--------------------------------------------------------------------------------
1 | # DynamicLink
2 |
3 | ```
4 | firebase.links.DynamicLink
5 | ```
6 |
7 | ### Constructor
8 | [method]new firebase.links.DynamicLink(link, dynamicLinkDomain);[/method]
9 |
10 | Builds a dynamic link.
11 |
12 | To create a DynamicLink, first populate it by using the `setX` methods available on the properties described below, then pass it to `firebase.links().createDynamicLink(link)` or `firebase.links().createShortDynamicLink(link)`;
13 |
14 | | Parameter | |
15 | | --------- | ------- |
16 | | link | **string** The link the target app will open. You can specify any URL the app can handle, such as a link to the app’s content, or a URL that initiates some app-specific logic such as crediting the user with a coupon, or displaying a specific welcome screen. This link must be a well-formatted URL, be properly URL-encoded, and use the HTTP or HTTPS scheme. |
17 | | dynamicLinkDomain | **string** The Firebase project’s Dynamic Links domain. You can find this value in the Dynamic Links section of the Firebase console. |
18 |
19 | ## Properties
20 |
21 | ### analytics
22 | [method]analytics returns nullable [ref links.AnalyticsParameters];[/method]
23 |
24 | Access Google Analytics specific link properties.
25 |
26 | ### android
27 | [method]android returns nullable [ref links.AndroidParameters];[/method]
28 |
29 | Access Android specific link properties.
30 |
31 | ### ios
32 | [method]ios returns nullable [ref links.IOSParameters];[/method]
33 |
34 | Access iOS specific link properties.
35 |
36 | ### itunes
37 | [method]itunes returns nullable [ref links.ITunesParameters];[/method]
38 |
39 | Access iTunes Connect specific link properties.
40 |
41 | ### navigation
42 | [method]navigation returns nullable [ref links.NavigationParameters];[/method]
43 |
44 | Access navigation specific link properties.
45 |
46 | ### social
47 | [method]social returns nullable [ref links.SocialParameters];[/method]
48 |
49 | Access social specific link properties.
50 |
--------------------------------------------------------------------------------
/docs/firestore/reference/FirestoreError.md:
--------------------------------------------------------------------------------
1 | # FirestoreError
2 |
3 | The set of Cloud Firestore status codes.
4 |
5 | Possible values:
6 |
7 | - `cancelled`: The operation was cancelled (typically by the caller).
8 | - `unknown`: Unknown error or an error from a different error domain.
9 | - `invalid-argument`: Client specified an invalid argument. Note that this differs from failed-precondition. invalid-argument indicates arguments that are problematic regardless of the state of the system (e.g. an invalid field name).
10 | - `deadline-exceeded`: Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.
11 | - `not-found`: Some requested document was not found.
12 | - `already-exists`: Some document that we attempted to create already exists.
13 | - `permission-denied`: The caller does not have permission to execute the specified operation.
14 | - `resource-exhausted`: Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
15 | - `failed-precondition`: Operation was rejected because the system is not in a state required for the operation`s execution.
16 | - `aborted`: The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.
17 | - `out-of-range`: Operation was attempted past the valid range.
18 | - `unimplemented`: Operation is not implemented or not supported/enabled.
19 | - `internal`: Internal errors. Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken.
20 | - `unavailable`: The service is currently unavailable. This is most likely a transient condition and may be corrected by retrying with a backoff.
21 | - `data-loss`: Unrecoverable data loss or corruption.
22 | - `unauthenticated`: The request does not have valid authentication credentials for the operation.
--------------------------------------------------------------------------------
/docs/crashlytics/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Pods (recommended)
6 |
7 | ### Add the pods
8 |
9 | Add the following to your `Podfile`:
10 |
11 | ```ruby
12 | pod 'Fabric', '~> {{ ios.fabric.tools }}'
13 | pod 'Crashlytics', '~> {{ ios.firebase.crashlytics }}'
14 | ```
15 |
16 | Run `pod update`.
17 |
18 | ### Add the Crashlytics run script
19 |
20 | 1. Open your project in Xcode and select its project file in the Navigator
21 | 2. Open the **Build Phases** tab.
22 | 3. Click **+ Add a new build phase**, and select **New Run Script Phase**.
23 | 4. Add the following line to the **Type a script..** text box:
24 |
25 | ```groovy
26 | "${PODS_ROOT}/Fabric/run"
27 | ```
28 |
29 | ## Manual
30 |
31 | ### Add to project
32 | 1. Go and download the [crashlytics iOS library](https://fabric.io/kits/ios/crashlytics/manual-install).
33 | 2. Add the `Crashytics.framework` and `Fabric.framework` to your iOS project.
34 | 3. Add both frameworks to "Link Binary With Libraries" in your Build Phases.
35 | 4. Add `$(PROJECT_DIR)/Firebase/Fabric` and `$(PROJECT_DIR)/Firebase/Crashlytics` to your "Header Search Paths" in Build Settings (Assuming Fabric and Crashlytics libraries are in a folder called `Firebase/Crashlytics`).
36 |
37 | ### Add the Crashlytics run script
38 |
39 | 1. Open your project in Xcode and select its project file in the Navigator
40 | 2. Open the **Build Phases** tab.
41 | 3. Click **+ Add a new build phase**, and select **New Run Script Phase**.
42 | 4. Add the following line to the **Type a script..** text box (Assuming the Fabric library is in `${SRCROOT}/Firebase/Fabric`):
43 |
44 | ```groovy
45 | "${SRCROOT}/Firebase/Fabric/Fabric.framework/run"
46 | ```
47 |
48 | 5. **Xcode 10 only:** Add your app's built Info.plist location to the Build Phase's Input Files field:
49 |
50 | ```groovy
51 | $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
52 | ```
53 |
54 |
55 | ----
56 |
57 | **Source:** [Firebase Crashlytics - Getting Started - iOS](https://firebase.google.com/docs/crashlytics/get-started#ios)
58 |
--------------------------------------------------------------------------------
/docs/functions/reference/HttpsError.md:
--------------------------------------------------------------------------------
1 | # HttpsError
2 |
3 | ```ts
4 | type HttpsError implements Error {
5 | +details: ?any;
6 | +code: FunctionsErrorCode;
7 | }
8 | ```
9 |
10 | ----
11 |
12 | ## Properties
13 |
14 | ### code
15 | [method]code returns [FunctionsErrorCode](#Types);[/method]
16 |
17 | A standard error code as returned by the first arg of your thrown error on cloud functions.
18 |
19 | [collapse Cloud Function Example]
20 | ```js
21 | // inside your cloud function
22 | throw new functions.https.HttpsError(
23 | 'cancelled', // <---- THIS
24 | 'Your error message goes here.',
25 | { foo: 'bar' },
26 | );
27 | ```
28 | [/collapse]
29 |
30 |
31 | ----
32 |
33 | ### message
34 | [method]message returns string;[/method]
35 |
36 | Your error message as thrown in your cloud function.
37 |
38 | [collapse Cloud Function Example]
39 | ```js
40 | // inside your cloud function
41 | throw new functions.https.HttpsError(
42 | 'cancelled',
43 | 'Your error message goes here.', // <---- THIS
44 | { foo: 'bar' },
45 | );
46 | ```
47 | [/collapse]
48 |
49 | ----
50 |
51 | ### details
52 | [method]details returns ?any;[/method]
53 |
54 | Extra data thrown with your error on your cloud function.
55 |
56 | [collapse Cloud Function Example]
57 | ```js
58 | // inside your cloud function
59 | throw new functions.https.HttpsError(
60 | 'cancelled',
61 | 'Your error message goes here.',
62 | { foo: 'bar' }, // <---- THIS
63 | );
64 | ```
65 | [/collapse]
66 |
67 |
68 | ----
69 |
70 | ## Types
71 |
72 | ### FunctionsErrorCode
73 |
74 | Statics for these also exist for equality comparisons e.g. `firebase.functions.HttpsErrorCode.CANCELLED` outputs `cancelled`;
75 |
76 | ```ts
77 | type FunctionsErrorCode =
78 | | 'ok'
79 | | 'cancelled'
80 | | 'unknown'
81 | | 'invalid-argument'
82 | | 'deadline-exceeded'
83 | | 'not-found'
84 | | 'already-exists'
85 | | 'permission-denied'
86 | | 'resource-exhausted'
87 | | 'failed-precondition'
88 | | 'aborted'
89 | | 'out-of-range'
90 | | 'unimplemented'
91 | | 'internal'
92 | | 'unavailable'
93 | | 'data-loss'
94 | | 'unauthenticated';
95 | ```
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidSemanticAction.md:
--------------------------------------------------------------------------------
1 | # AndroidSemanticAction
2 |
3 | ```
4 | firebase.notifications.Android.SemanticAction
5 | ```
6 |
7 | ## Constants
8 |
9 | ### Archive
10 |
11 | Archive the content associated with the notification. This could mean archiving an email, message, etc.
12 |
13 | ```
14 | firebase.notifications.Android.SemanticAction.Archive
15 | ```
16 |
17 | ### Call
18 |
19 | Call a contact, group, etc.
20 |
21 | ```
22 | firebase.notifications.Android.SemanticAction.Call
23 | ```
24 |
25 | ### Delete
26 |
27 | Delete the content associated with the notification. This could mean deleting an email, message, etc.
28 |
29 | ```
30 | firebase.notifications.Android.SemanticAction.Delete
31 | ```
32 |
33 | ### MarkAsRead
34 |
35 | Mark content as read.
36 |
37 | ```
38 | firebase.notifications.Android.SemanticAction.MarkAsRead
39 | ```
40 |
41 | ### MarkAsUnread
42 |
43 | Mark content as unread.
44 |
45 | ```
46 | firebase.notifications.Android.SemanticAction.MarkAsUnread
47 | ```
48 |
49 | ### Mute
50 |
51 | Mute the content associated with the notification. This could mean silencing a conversation or currently playing media.
52 |
53 | ```
54 | firebase.notifications.Android.SemanticAction.Mute
55 | ```
56 |
57 | ### None
58 |
59 | No semantic action defined.
60 |
61 | ```
62 | firebase.notifications.Android.SemanticAction.None
63 | ```
64 |
65 | ### Reply
66 |
67 | Reply to a conversation, chat, group, or wherever replies may be appropriate.
68 |
69 | ```
70 | firebase.notifications.Android.SemanticAction.Reply
71 | ```
72 |
73 | ### ThumbsDown
74 |
75 | Mark content with a thumbs down.
76 |
77 | ```
78 | firebase.notifications.Android.SemanticAction.ThumbsDown
79 | ```
80 |
81 | ### ThumbsUp
82 |
83 | Mark content with a thumbs up.
84 |
85 | ```
86 | firebase.notifications.Android.SemanticAction.ThumbsUp
87 | ```
88 |
89 | ### Unmute
90 |
91 | Unmute the content associated with the notification. This could mean un-silencing a conversation or currently playing media.
92 |
93 | ```
94 | firebase.notifications.Android.SemanticAction.Unmute
95 | ```
--------------------------------------------------------------------------------
/docs/admob/reference/Interstitial.md:
--------------------------------------------------------------------------------
1 | # Interstitial
2 |
3 | ```
4 | firebase.admob.interstitial
5 | ```
6 |
7 | An interstitial is a full screen advert which creates a new activity on top of React. As they need to be controlled, allowing the developer to choose when to display them they're not available as a component. Instead they're controlled via method calls. A single interstitial instance can only be shown once. If you want to display another, create a new one.
8 |
9 | ## Methods
10 |
11 | ### loadAd
12 | [method]loadAd(request) returns void;[/method]
13 |
14 | Starting loading an interstial from the Firebase servers with a given [ref admob.AdRequest#build] payload.
15 |
16 | | Parameter | |
17 | | --------- | ------- |
18 | | request | **[ref admob.AdRequest#build]** An AdRequest.build object |
19 |
20 | ### on
21 | [method]on(event, callback) returns void;[/method]
22 |
23 | Listens for advert events. See [EventTypes](version /admob/reference#eventtypes) for more information.
24 |
25 | | Parameter | |
26 | | --------- | ------- |
27 | | event | **[ref admob#EventTypes]** A single event type |
28 | | callback | **function** |
29 |
30 | ### isLoaded
31 | [method]isLoaded() returns boolean;[/method]
32 |
33 | Returns whether the current requested advert has loaded from the Firebase servers.
34 |
35 | ### show
36 | [method]show() returns void;[/method]
37 |
38 | Shows the loaded advert on the device.
39 |
40 | ## Example
41 |
42 | ```javascript
43 | const advert = firebase.admob().interstitial('ca-app-pub-3940256099942544/1033173712');
44 |
45 | const AdRequest = firebase.admob.AdRequest;
46 | const request = new AdRequest();
47 | request.addKeyword('foo').addKeyword('bar');
48 |
49 | // Load the advert with our AdRequest
50 | advert.loadAd(request.build());
51 |
52 | advert.on('onAdLoaded', () => {
53 | console.log('Advert ready to show.');
54 | });
55 |
56 | // Simulate the interstitial being shown "sometime" later during the apps lifecycle
57 | setTimeout(() => {
58 | if (advert.isLoaded()) {
59 | advert.show();
60 | } else {
61 | // Unable to show interstitial - not loaded yet.
62 | }
63 | }, 1000);
64 | ```
65 |
--------------------------------------------------------------------------------
/docs/notifications/ios.md:
--------------------------------------------------------------------------------
1 | # iOS Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup) and the [messaging setup guide](version /messaging/ios).
4 |
5 | ?> Remote notifications do not work on the iOS simulator, you must test them using a real device. This is a restriction enforced by Apple.
6 |
7 | ## Update `AppDelegate.m`
8 |
9 | Add the following import to the top of your `ios/[App Name]/AppDelegate.m`:
10 |
11 | ```objectivec
12 | #import "RNFirebaseNotifications.h"
13 | ```
14 |
15 | Add the following to the `didFinishLaunchingWithOptions:(NSDictionary *)launchOptions` method, right after `[FIRApp Configure]`:
16 |
17 | ```objectivec
18 | [RNFirebaseNotifications configure];
19 | ```
20 |
21 | Add the following method:
22 |
23 | ```objectivec
24 | - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
25 | [[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
26 | }
27 | ```
28 |
29 | ## Remote Notifications (Optional)
30 |
31 | If you would like to support Remote Notifications via FCM, also add the following import to the top of your `ios/[App Name]/AppDelegate.m`:
32 |
33 | ```objectivec
34 | #import "RNFirebaseMessaging.h"
35 | ```
36 |
37 | Then add the following methods to your `ios/[App Name]/AppDelegate.m`:
38 |
39 | ```objectivec
40 | - (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
41 | fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
42 | [[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
43 | }
44 |
45 | - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
46 | [[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
47 | }
48 | ```
49 |
50 | ## Debugging
51 |
52 | If you're having problems with messages not being received, check out the following blog post for help:
53 |
54 | https://firebase.googleblog.com/2017/01/debugging-firebase-cloud-messaging-on.html
55 |
--------------------------------------------------------------------------------
/docs/crashlytics/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the dependency
6 |
7 | Add the Firebase Crashlytics dependency to `android/app/build.gradle`:
8 |
9 | ```groovy
10 | dependencies {
11 | // ...
12 | implementation('com.crashlytics.sdk.android:crashlytics:{{ android.firebase.crashlytics }}@aar') {
13 | transitive = true
14 | }
15 | }
16 | ```
17 |
18 | Crashlytics also requires the Fabric Gradle dependency. In your projects `android/build.gradle` file, add the plugin to your dependencies and also check that you have version {{ android.gms.google-services }} of the google-services plugin:
19 |
20 | ```groovy
21 | buildscript {
22 | // ...
23 | dependencies {
24 | // ...
25 | classpath 'com.google.gms:google-services:{{ android.gms.google-services }}'
26 | classpath 'io.fabric.tools:gradle:{{ android.fabric.tools }}'
27 | }
28 | }
29 | ```
30 |
31 | You need to add `maven { url 'https://maven.fabric.io/public' }` to your `android/build.gradle` as follows:
32 |
33 | ```groovy
34 | buildscript {
35 | repositories {
36 | jcenter()
37 | maven {
38 | url 'https://maven.fabric.io/public'
39 | }
40 | }
41 | // ...
42 | }
43 | ```
44 |
45 | At the top of your `android/app/build.gradle` file, below other plugins, apply the `io.fabric` plugin:
46 |
47 | ```groovy
48 | apply plugin: "com.android.application"
49 | apply plugin: "io.fabric"
50 | ```
51 |
52 | ## Install the RNFirebase Crashlytics package
53 |
54 | Add the `RNFirebaseCrashlyticsPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
55 |
56 | ```java
57 | // ...
58 | import io.invertase.firebase.RNFirebasePackage;
59 | import io.invertase.firebase.fabric.crashlytics.RNFirebaseCrashlyticsPackage; // <-- Add this line
60 |
61 | public class MainApplication extends Application implements ReactApplication {
62 | // ...
63 |
64 | @Override
65 | protected List getPackages() {
66 | return Arrays.asList(
67 | new MainReactPackage(),
68 | new RNFirebasePackage(),
69 | new RNFirebaseCrashlyticsPackage() // <-- Add this line
70 | );
71 | }
72 | };
73 | // ...
74 | }
75 | ```
76 |
--------------------------------------------------------------------------------
/docs/admob/reference/RewardedVideo.md:
--------------------------------------------------------------------------------
1 | # Rewarded Video
2 |
3 | ```
4 | firebase.admob.rewarded
5 | ```
6 |
7 | A rewarded video allows you to display a video to a user, whereby they're able to watch it to gain "rewards", or skip it
8 | and receive nothing. For example, when a user completes a level on your gaming app, show them a video which will give them in-game
9 | credit.
10 |
11 | A single rewarded video instance can only be shown once. If you want to display another, create a new one.
12 |
13 | > It's recommended you begin loading the video as soon as possible.
14 |
15 | ## Methods
16 |
17 | ### loadAd
18 | [method]loadAd(request) returns void;[/method]
19 |
20 | Starting loading an interstial from the Firebase servers with a given [ref admob.AdRequest#build] payload.
21 |
22 | | Parameter | |
23 | | --------- | ------- |
24 | | request | **[ref admob.AdRequest#build]** An AdRequest.build object |
25 |
26 | ### on
27 | [method]on(event, callback) returns void;[/method]
28 |
29 | Listens for advert events. See [EventTypes](version /admob/reference#eventtypes) for more information.
30 |
31 | | Parameter | |
32 | | --------- | ------- |
33 | | event | **[ref admob#EventTypes]** or **[ref admob#RewardedVideoEventTypes]** A single event type |
34 | | callback | **function** |
35 |
36 | ### isLoaded
37 | [method]isLoaded() returns boolean;[/method]
38 |
39 | Returns whether the current requested advert has loaded from the Firebase servers.
40 |
41 | ### show
42 | [method]show() returns void;[/method]
43 |
44 | Shows the loaded advert on the device.
45 |
46 | ## Example
47 |
48 | ```js
49 | const advert = firebase.admob().rewarded('ca-app-pub-3940256099942544/1033173712');
50 |
51 | const AdRequest = firebase.admob.AdRequest;
52 | const request = new AdRequest();
53 | request.addKeyword('foo').addKeyword('bar');
54 |
55 | // Load the advert with our AdRequest
56 | advert.loadAd(request.build());
57 |
58 | advert.on('onAdLoaded', () => {
59 | console.log('Advert ready to show.');
60 | });
61 |
62 | advert.on('onRewarded', (event) => {
63 | console.log('The user watched the entire video and will now be rewarded!', event);
64 | });
65 |
66 | ...
67 |
68 | onLevelComplete()
69 | .then(() => {
70 | if (advert.isLoaded()) {
71 | advert.show();
72 | } else {
73 | // skip...
74 | }
75 | });
76 | ```
77 |
--------------------------------------------------------------------------------
/docs/releases/v5.1.1.md:
--------------------------------------------------------------------------------
1 | ## 5.1.1
2 |
3 | This patch release is mainly to fix several minor typings issues (TS & Flow).
4 |
5 | Thanks to all our [contributors](https://github.com/invertase/react-native-firebase/compare/v5.1.0...v5.1.1). 💛
6 |
7 | You can compare all changes between v5.1.0 and v5.1.1 [here](https://github.com/invertase/react-native-firebase/compare/v5.1.0...v5.1.1).
8 |
9 | ### Upgrade from v5.1.0
10 |
11 | No native code or dependency version changes required. Install the latest version via NPM:
12 |
13 | ```bash
14 | npm install --save react-native-firebase@5.1.1
15 | ```
16 |
17 | ----
18 |
19 | ### General
20 |
21 | - [TYPESCRIPT] [ENHANCEMENT] [ANALYTICS] Add `setUserProperties` type definition
22 | - [TYPESCRIPT] [ENHANCEMENT] [AUTHENTICATION] Improve TS types for auth listeners
23 | - [TYPESCRIPT] [ENHANCEMENT] [STORAGE] Export storage statics (`.Native`, `.TaskState` and `.TaskEvent`) - fixes #1706
24 | - [TYPESCRIPT] [ENHANCEMENT] [FIRESTORE] Improve `onSnapshot` error type definitions - fixes #1708
25 | - [FLOW] [BUGFIX] [LINKS] Change return type to `string` literal instead of incorrect usage of `String`
26 | - [TESTS] [ENHANCEMENT] [DATABASE] Improve query test coverage
27 |
28 | ----
29 |
30 | ### Android
31 |
32 | - [ANDROID] [BUGFIX] [NOTIFICATIONS] Added missing input text result field to `notificationOpen` object
33 | - [ANDROID] [ENHANCEMENT] [BUILD] Update build script to also read Android sources from `react-native` root directory - fixes #1697
34 |
35 | ----
36 |
37 | ### iOS
38 |
39 | - [IOS] [BUGFIX] [AUTHENTICATION] `authStateChanged` listeners now correctly torn down between RN reloads - fixes #1677
40 |
41 | ----
42 |
43 | ## Feedback
44 |
45 | We want your feedback!
46 |
47 | If you have any comments and suggestions or want to report an issue, come find us on [Discord](https://discord.gg/C9aK28N), [Twitter](https://twitter.com/rnfirebase) or [GitHub](https://github.com/invertase/react-native-firebase).
48 |
49 | ## Contributing
50 |
51 | Thank to [all the contributors](https://github.com/invertase/react-native-firebase/graphs/contributors?from=2018-06-28&to=2020-01-01&type=c) that made this release happen 💛.
52 |
53 | If you'd like to contribute please check out our new [testing](https://rnfirebase.io/docs/v5.x.x/testing) and [contributing](https://rnfirebase.io/docs/v5.x.x/contributing) guides.
54 |
55 | ## Other Releases
56 |
57 | [View other releases.](/docs/v5.x.x/release-notes)
58 |
--------------------------------------------------------------------------------
/docs/invites/reference/Invites.md:
--------------------------------------------------------------------------------
1 | # Dynamic Links
2 |
3 | [Firebase Invites](https://firebase.google.com/docs/invites/) are an out-of-the-box solution for app referrals and sharing via email or SMS.
4 |
5 | ## Methods
6 |
7 | The following methods are accessed via the default app's Invites instance `firebase.invites()`.
8 |
9 | ### getInitialInvitation
10 | [method]getInitialInvitation() returns Promise containing nullable [ref invites.InvitationOpen];[/method]
11 |
12 | Returns the Invitation that the app has been launched from. If the app was not launched from an Invitation the return value will be null.
13 |
14 | [collapse Example]
15 | ```javascript
16 | firebase.invites()
17 | .getInitialInvitation()
18 | .then((invitation) => {
19 | if (invitation) {
20 | // app opened from an Invitation
21 | } else {
22 | // app NOT opened from an invitation
23 | }
24 | });
25 | ```
26 | [/collapse]
27 |
28 | ### onInvitation
29 | [method]onInvitation(listener) returns Function;[/method]
30 |
31 | When an invitation is opened whilst the app is open, the listener is invoked with the invitation.
32 |
33 | Returns an unsubscribe function.
34 |
35 | Parameter | |
36 | | --------- | ------- |
37 | | listener | **function([ref invitations.InvitationOpen])** This function is called when an invitation is opened. |
38 |
39 | [collapse Example]
40 | ```javascript
41 | // subscribe
42 | const unsubscribe = firebase.invites().onInvitation((invitation) => {
43 | // ...
44 | });
45 |
46 | // unsubscribe
47 | unsubscribe();
48 | ```
49 | [/collapse]
50 |
51 | ### sendInvitation
52 | [method]sendInvitation(invitation) returns Promise containing Array of string;[/method]
53 |
54 | !> on iOS, the user must be signed in with their Google Account for this to work.
55 |
56 | Displays the invitation dialog which allows the user to select who received the invitation.
57 |
58 | Returns a promise that resolves with the created invitation IDs if the invitation is sent, otherwise it is rejected with an error.
59 |
60 | | Parameter | |
61 | | --------- | ------- |
62 | | invitation | **[ref invitations.Invitation]** The invitation to send. |
63 |
64 | [collapse Example]
65 | ```javascript
66 | // create invitation
67 | const invitation = new firebase.invites.Invitation('Title', 'Message');
68 | invitation.setDeepLink('https://je786.page.link/testing');
69 | // send the invitation
70 | const invitationIds = await firebase.invites().sendInvitation(invitation);
71 | // use the invitationIds as you see fit
72 | ```
73 | [/collapse]
74 |
--------------------------------------------------------------------------------
/docs/invites/reference/AndroidInvitation.md:
--------------------------------------------------------------------------------
1 | # Invitation
2 |
3 | Android specific invitation settings.
4 |
5 | ## Methods
6 |
7 | ### setAdditionalReferralParameters
8 | [method]setAdditionalReferralParameters(additionalReferralParameters) returns [ref invites.Invitation];[/method]
9 |
10 | Adds query parameters to the play store referral URL when the app needs additional referral parameters for other application component referrals. These parameters are added to the referral URL sent from the play store and are available to be processed by other application components, for example Google Analytics. The parameters are set as name, value pairs that will be set as query parameter name and value on the referral URL.
11 |
12 | | Parameter | |
13 | | --------- | ------- |
14 | | additionalReferralParameters | **Object** Referral parameters defined as name value pairs. |
15 |
16 | ### setEmailHtmlContent
17 | [method]setEmailHtmlContent(emailHtmlContent) returns [ref invites.Invitation];[/method]
18 |
19 | Sets the HTML-formatted (UTF-8 encoded, no JavaScript) content for invites sent through email. If set, this will be sent instead of the default email.
20 |
21 | emailHtmlContent must be valid HTML for standard email processing. The pattern %%APPINVITE_LINK_PLACEHOLDER%% should be embedded in your htmlContent and will be replaced with the invitation URL. This url is a link that will launch the app if already installed or take the user to the appropriate app store if not. In both cases the deep link will be available if provided using setDeepLink(Uri).
22 |
23 | | Parameter | |
24 | | --------- | ------- |
25 | | emailHtmlContent | **number** The html-formatted content for the email. |
26 |
27 | ### setEmailSubject
28 | [method]setEmailSubject(emailSubject) returns [ref invites.Invitation];[/method]
29 |
30 | Sets the subject for invites sent by email.
31 |
32 | | Parameter | |
33 | | --------- | ------- |
34 | | emailSubject | **string** The subject for the email. |
35 |
36 | ### setGoogleAnalyticsTrackingId
37 | [method]setGoogleAnalyticsTrackingId(googleAnalyticsTrackingId) returns [ref invites.Invitation];[/method]
38 |
39 | Sets the Google Analytics Tracking id. The tracking id should be created for the calling application under Google Analytics. See more about how to get a tracking id . The tracking id is recommended so that invitations sent from the calling application are available in Google Analytics.
40 |
41 | | Parameter | |
42 | | --------- | ------- |
43 | | googleAnalyticsTrackingId | **string** String of the form UA-xxxx-y |
44 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidCategory.md:
--------------------------------------------------------------------------------
1 | # AndroidCategory
2 |
3 | ```
4 | firebase.notifications.Android.Category
5 | ```
6 |
7 | ## Constants
8 |
9 | ### Alarm
10 |
11 | Alarm or timer.
12 |
13 | ```
14 | firebase.notifications.Android.Category.Alarm
15 | ```
16 |
17 | ### Call
18 |
19 | Incoming call (voice or video) or similar synchronous communication request.
20 |
21 | ```
22 | firebase.notifications.Android.Category.Call
23 | ```
24 |
25 | ### Email
26 |
27 | Asynchronous bulk message (email).
28 |
29 | ```
30 | firebase.notifications.Android.Category.Email
31 | ```
32 |
33 | ### Error
34 |
35 | Error in background operation or authentication status.
36 |
37 | ```
38 | firebase.notifications.Android.Category.Error
39 | ```
40 |
41 | ### Event
42 |
43 | Calendar event.
44 |
45 | ```
46 | firebase.notifications.Android.Category.Event
47 | ```
48 |
49 | ### Message
50 |
51 | Incoming direct message (SMS, instant message, etc.).
52 |
53 | ```
54 | firebase.notifications.Android.Category.Message
55 | ```
56 |
57 | ### Progress
58 |
59 | Progress of a long-running background operation.
60 |
61 | ```
62 | firebase.notifications.Android.Category.Progress
63 | ```
64 |
65 | ### Promo
66 |
67 | Promotion or advertisement.
68 |
69 | ```
70 | firebase.notifications.Android.Category.Promo
71 | ```
72 |
73 | ### Recommendation
74 |
75 | A specific, timely recommendation for a single thing. For example, a news app might want to recommend a news story it believes the user will want to read next.
76 |
77 | ```
78 | firebase.notifications.Android.Category.Recommendation
79 | ```
80 |
81 | ### Reminder
82 |
83 | User-scheduled reminder.
84 |
85 | ```
86 | firebase.notifications.Android.Category.Reminder
87 | ```
88 |
89 | ### Service
90 |
91 | Indication of running background service.
92 |
93 | ```
94 | firebase.notifications.Android.Category.Service
95 | ```
96 |
97 | ### Social
98 |
99 | Social network or sharing update.
100 |
101 | ```
102 | firebase.notifications.Android.Category.Social
103 | ```
104 |
105 | ### Status
106 |
107 | Ongoing information about device or contextual status.
108 |
109 | ```
110 | firebase.notifications.Android.Category.Status
111 | ```
112 |
113 | ### System
114 |
115 | System or device status update. Reserved for system use.
116 |
117 | ```
118 | firebase.notifications.Android.Category.System
119 | ```
120 |
121 | ### Transport
122 |
123 | Media transport control for playback.
124 |
125 | ```
126 | firebase.notifications.Android.Category.Transport
127 | ```
--------------------------------------------------------------------------------
/docs/auth/reference/Error.md:
--------------------------------------------------------------------------------
1 | # Error
2 |
3 | An authentication error. For method-specific error codes, refer to the specific methods in the documentation. For common error codes, check the reference below. Use [ref auth.Error#code] to get the specific error code. For a detailed message, use f[ref auth.Error#message].
4 |
5 | ## Properties
6 |
7 | ### code
8 | [method]code returns string;[/method]
9 |
10 | Unique error code.
11 |
12 | ### message
13 | [method]message returns string;[/method]
14 |
15 | Complete error message.
16 |
17 | ## Common Error Codes
18 |
19 | - `auth/app-deleted`: Thrown if the instance of FirebaseApp has been deleted.
20 | - `auth/app-not-authorized`: Thrown if the app identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.
21 | - `auth/argument-error`: Thrown if a method is called with incorrect arguments.
22 | - `auth/invalid-api-key`: Thrown if the provided API key is invalid. Please check that you have copied it correctly from the Firebase Console.
23 | - `auth/invalid-user-token`: Thrown if the user's credential is no longer valid. The user must sign in again.
24 | - `auth/network-request-failed`: Thrown if a network error (such as timeout, interrupted connection or unreachable host) has occurred.
25 | - `auth/operation-not-allowed`: Thrown if you have not enabled the provider in the Firebase Console. Go to the Firebase Console for your project, in the Auth section and the Sign in Method tab and configure the provider.
26 | - `auth/requires-recent-login`: Thrown if the user's last sign-in time does not meet the security threshold. Use [ref auth.User#reauthenticateWithCredential] to resolve. This does not apply if the user is anonymous.
27 | - `auth/too-many-requests`: Thrown if requests are blocked from a device due to unusual activity. Trying again after some delay would unblock.
28 | - `auth/unauthorized-domain`: Thrown if the app domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.
29 | - `auth/user-disabled`: Thrown if the user account has been disabled by an administrator. Accounts can be enabled or disabled in the Firebase Console, the Auth section and Users subsection.
30 | - `auth/user-token-expired`: Thrown if the user's credential has expired. This could also be thrown if a user has been deleted. Prompting the user to sign in again should resolve this for either case.
31 | - `auth/web-storage-unsupported`: Thrown if the browser does not support web storage or if the user disables them.
32 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidNotifications.md:
--------------------------------------------------------------------------------
1 | # AndroidNotifications
2 |
3 | This deals with Android-specific Notification functionality.
4 |
5 | ## Methods
6 |
7 | The following methods are accessed via the AndroidNotifications instance `firebase.notifications().android`
8 |
9 |
10 | ### createChannel
11 | [method]createChannel(channel) returns Promise;[/method]
12 |
13 | Creates a new channel.
14 |
15 | Returns a promise that resolves if the channel is created, otherwise it is rejected with an error.
16 |
17 | | Parameter | |
18 | | --------- | ------- |
19 | | channel | **[ref notifications.AndroidChannel]** The channel to create. |
20 |
21 | ### createChannelGroup
22 | [method]createChannelGroup(channelGroup) returns Promise;[/method]
23 |
24 | Creates a new channel group.
25 |
26 | Returns a promise that resolves if the channel group is created, otherwise it is rejected with an error.
27 |
28 | | Parameter | |
29 | | --------- | ------- |
30 | | channelGroup | **[ref notifications.AndroidChannelGroup]** The channel group to create. |
31 |
32 | ### createChannelGroups
33 | [method]createChannelGroups(channelGroups) returns Promise;[/method]
34 |
35 | Creates multiple new channel grousps
36 |
37 | Returns a promise that resolves if the channel groups are created, otherwise it is rejected with an error.
38 |
39 | | Parameter | |
40 | | --------- | ------- |
41 | | channelGroups | **Array<[ref notifications.AndroidChannelGroup]>** The channel groups to create. |
42 |
43 | ### createChannels
44 | [method]createChannels(channels) returns Promise;[/method]
45 |
46 | Creates multiple new channels.
47 |
48 | Returns a promise that resolves if the channels are created, otherwise it is rejected with an error.
49 |
50 | | Parameter | |
51 | | --------- | ------- |
52 | | channels | **Array<[ref notifications.AndroidChannel]>** The channels to create. |
53 |
54 | ### deleteChannel
55 | [method]deleteChannel(channelId) returns Promise;[/method]
56 |
57 | Deletes a channel.
58 |
59 | Returns a promise that resolves if the channel is deleted, otherwise it is rejected with an error.
60 |
61 | | Parameter | |
62 | | --------- | ------- |
63 | | channelId | **string** The channel to delete. |
64 |
65 | ### deleteChannelGroup
66 | [method]deleteChannelGroup(channelGroupId) returns Promise;[/method]
67 |
68 | Deletes a channel group.
69 |
70 | Returns a promise that resolves if the channel group is deleted, otherwise it is rejected with an error.
71 |
72 | | Parameter | |
73 | | --------- | ------- |
74 | | channelGroupId | **string** The channel group to delete. |
75 |
--------------------------------------------------------------------------------
/docs/notifications/reference/AndroidRemoteInput.md:
--------------------------------------------------------------------------------
1 | # AndroidRemoteInput
2 |
3 | ```
4 | firebase.notifications.Android.RemoteInput
5 | ```
6 |
7 | See the official [Android docs](https://developer.android.com/training/notify-user/build-notification.html#reply-action) for more information about Remote Input.
8 |
9 | ### Constructor
10 | [method]new firebase.notifications.Android.RemoteInput(resultKey);[/method]
11 |
12 | A RemoteInput object specifies input to be collected from a user to be passed along with an intent inside a PendingIntent that is sent.
13 |
14 | | Parameter | |
15 | | --------- | ------- |
16 | | resultKey | **string** |
17 |
18 | ## Properties
19 |
20 | ### allowedDataTypes
21 | [method]allowedDataTypes returns Array of Object;[/method]
22 |
23 | The data types this remote input supports.
24 |
25 | ### allowFreeFormInput
26 | [method]allowFreeFormInput returns nullable boolean;[/method]
27 |
28 | Get whether or not users can provide an arbitrary value for input.
29 |
30 | ### choices
31 | [method]choices returns Array of string;[/method]
32 |
33 | Get possible input choices.
34 |
35 | ### label
36 | [method]choices returns nullable string;[/method]
37 |
38 | Get the label to display to users when collecting this input.
39 |
40 | ### resultKey
41 | [method]resultKey returns string;[/method]
42 |
43 | Get the key that the result of this input will be set in the [ref notifications.NotificationOpened] `results` object.
44 |
45 | ## Methods
46 |
47 | ### setAllowDataType
48 | [method]setAllowDataType(mimeType, allow) returns [ref notifications.AndroidRemoteInput];[/method]
49 |
50 | | Parameter | |
51 | | --------- | ------- |
52 | | mimeType | **string** |
53 | | allow | **boolean** |
54 |
55 | Specifies whether the user can provide arbitrary values.
56 |
57 | ### setAllowFreeFormInput
58 | [method]setAllowFreeFormInput(allowFreeFormInput) returns [ref notifications.AndroidRemoteInput];[/method]
59 |
60 | | Parameter | |
61 | | --------- | ------- |
62 | | allowFreeFormInput | **boolean** |
63 |
64 | Specifies whether the user can provide arbitrary text values.
65 |
66 | ### setChoices
67 | [method]setChoices(choices) returns [ref notifications.AndroidRemoteInput];[/method]
68 |
69 | | Parameter | |
70 | | --------- | ------- |
71 | | choices | **Array** |
72 |
73 | Specifies choices available to the user to satisfy this input.
74 |
75 | ### setLabel
76 | [method]setLabel(label) returns [ref notifications.AndroidRemoteInput];[/method]
77 |
78 | | Parameter | |
79 | | --------- | ------- |
80 | | label | **string** |
81 |
82 | Set a label to be displayed to the user when collecting this input.
83 |
--------------------------------------------------------------------------------
/docs/admob/reference/AdRequest.md:
--------------------------------------------------------------------------------
1 | # AdRequest
2 |
3 | ```
4 | firebase.admob.AdRequest
5 | ```
6 |
7 | The AdRequest class is used to create an object to be passed to each advert request. The request is handled on AdMob, and returns adverts tailored to the request options provided.
8 |
9 | If no AdRequest is sent, the default request calls addTestDevice. Therefore, ensure a custom AdRequest object is passed through in production.
10 |
11 | ## Methods
12 |
13 | ### build
14 | [method]build() returns object;[/method]
15 |
16 | Builds the current ad request for AdMob to handle.
17 |
18 | ### addTestDevice
19 | [method]addTestDevice(device) returns [ref admob.AdRequest];[/method]
20 |
21 | Sets a device ID as a test device. If no device string is passed, a default emulator id is passed.
22 |
23 | | Parameter | |
24 | | --------- | ------- |
25 | | device | **string** (optional) Device ID. If null, a default emulator id is passed. |
26 |
27 | ### addKeyword
28 | [method]addKeyword(keyword) returns [ref admob.AdRequest];[/method]
29 |
30 | Add a new keyword to relate the advert to.
31 |
32 | | Parameter | |
33 | | --------- | ------- |
34 | | keyword | **string** |
35 |
36 | ### setGender
37 | [method]setGender(gender) returns [ref admob.AdRequest];[/method]
38 |
39 | Sets the user's gender for targeting purposes.
40 |
41 | | Parameter | |
42 | | --------- | ------- |
43 | | gender | **string** One of `male`, `female`, `unknown` |
44 |
45 | ### setRequestAgent
46 | [method]setRequestAgent(requestAgent) returns [ref admob.AdRequest];[/method]
47 |
48 | Sets the request agent string to identify the ad request's origin. Third party libraries that reference the Mobile Ads SDK should call this method to denote the platform from which the ad request originated. For example, if a third party ad network called "CoolAds network" mediates requests to the Mobile Ads SDK, it should call this method with "CoolAds"
49 |
50 | | Parameter | |
51 | | --------- | ------- |
52 | | requestAgent | **string** |
53 |
54 | ### setContentUrl
55 | [method]setContentUrl(url) returns [ref admob.AdRequest];[/method]
56 |
57 | Sets the content URL for targeting purposes.
58 |
59 | | Parameter | |
60 | | --------- | ------- |
61 | | url | **string** |
62 |
63 | ### tagForChildDirectedTreatment
64 | [method]tagForChildDirectedTreatment(forChildren) returns [ref admob.AdRequest];[/method]
65 |
66 | Sets whether the request will be shown to children.
67 |
68 | | Parameter | |
69 | | --------- | ------- |
70 | | forChildren | **boolean** |
71 |
72 | ## Unsupported Methods
73 |
74 | ### setBirthday
75 |
76 | ### setLocation
77 |
78 | ### setIsDesignedForFamilies
79 |
--------------------------------------------------------------------------------
/docs/database/reference/database.md:
--------------------------------------------------------------------------------
1 | # Database
2 |
3 | ```
4 | firebase.database
5 | ```
6 |
7 | ## Methods
8 |
9 | The following methods are accessed via the Database instance `firebase.database()`.
10 |
11 | ### goOffline
12 | [method]goOffline() returns void;[/method]
13 |
14 | Disconnects from the server (all Database operations will be completed offline).
15 |
16 | The client automatically maintains a persistent connection to the Database server, which will remain active indefinitely and reconnect when disconnected. However, the goOffline() and goOnline() methods may be used to control the client connection in cases where a persistent connection is undesirable.
17 |
18 | While offline, the client will no longer receive data updates from the Database. However, all Database operations performed locally will continue to immediately fire events, allowing your application to continue behaving normally. Additionally, each operation performed locally will automatically be queued and retried upon reconnection to the Database server.
19 |
20 | To reconnect to the Database and begin receiving remote events, see [ref database.database#goOnline].
21 |
22 | [collapse Example]
23 | ```js
24 | firebase.database().goOffline();
25 | ```
26 | [/collapse]
27 |
28 | ### goOnline
29 | [method]goOnline() returns void;[/method]
30 |
31 | Reconnects to the server and synchronizes the offline Database state with the server state.
32 |
33 | This method should be used after disabling the active connection with goOffline(). Once reconnected, the client will transmit the proper data and fire the appropriate events so that your client "catches up" automatically.
34 |
35 |
36 | [collapse Example]
37 | ```js
38 | firebase.database().goOnline();
39 | ```
40 | [/collapse]
41 |
42 | ### ref
43 | [method]ref(path) returns [ref database.Reference];[/method]
44 |
45 | Returns a Reference representing the location in the Database corresponding to the provided path. If no path is provided, the Reference will point to the root of the Database.
46 |
47 | [collapse Example]
48 | ```js
49 | const ref = firebase.database().ref('path');
50 | ref.update({ foo: 'bar' });
51 | ```
52 | [/collapse]
53 |
54 | | Parameter | |
55 | | --------- | ------- |
56 | | path | **string** (optional) Optional path representing the location the returned Reference will point. If not provided, the returned Reference will point to the root of the Database. |
57 |
58 | ### getServerTime
59 | [method]getServerTime() returns number;[/method]
60 |
61 | Gets the Firebase server current timestamp.
62 |
63 | [collapse Example]
64 | ```js
65 | const serverTime = firebase.database().getServerTime();
66 | ```
67 | [/collapse]
68 |
69 | ## Unsupported Methods
70 |
71 | ### refFromURL
72 |
--------------------------------------------------------------------------------
/docs/firestore/reference/Transaction.md:
--------------------------------------------------------------------------------
1 | # Transaction
2 |
3 | A reference to a transaction.
4 |
5 | The `Transaction` object passed to a transaction's updateFunction provides the methods to read and write data within the transaction context. See `Firestore.runTransaction()`.
6 |
7 | ## Methods
8 |
9 | ### delete
10 | [method]delete(documentRef) returns [ref firestore.Transaction];[/method]
11 |
12 | Deletes the document referred to by the provided `DocumentReference`.
13 |
14 | | Parameter | |
15 | | --------- | ------- |
16 | | documentRef | **[ref firestore.DocumentReference]** A reference to the document to be deleted. Value must not be null. |
17 |
18 | ### get
19 | [method]get(documentRef) returns Promise containing [ref firestore.DocumentSnapshot];[/method]
20 |
21 | Reads the document referenced by the provided `DocumentReference`.
22 |
23 | | Parameter | |
24 | | --------- | ------- |
25 | | documentRef | **[ref firestore.DocumentReference]** A reference to the document to be retrieved. Value must not be null. |
26 |
27 | ### set
28 | [method]set(documentRef, data, options) returns Promise containing [ref firestore.Transaction];[/method]
29 |
30 | Writes to the document referred to by the provided `DocumentReference`. If the document does not exist yet, it will be created. If you pass options, the provided data can be merged into the existing document.
31 |
32 | | Parameter | |
33 | | --------- | ------- |
34 | | documentRef | **[ref firestore.DocumentReference]** A reference to the document to be created. Value must not be null. |
35 | | data | **Object** An object of the fields and values for the document. Value must not be null. |
36 | | options | **[ref firestore.SetOptions]** (optional) An object to configure the set behavior. Pass **{merge: true}** to only replace the values specified in the data argument. Fields omitted will remain untouched. |
37 |
38 | ### update
39 | [method]update(documentRef, ...var_args) returns [ref firestore.Transaction];[/method]
40 |
41 | Updates fields in the document referred to by this DocumentReference. The update will fail if applied to a document that does not exist.
42 |
43 | Nested fields can be updated by providing dot-separated field path strings or by providing FieldPath objects.
44 |
45 | | Parameter | |
46 | | --------- | ------- |
47 | | documentRef | **[ref firestore.DocumentReference]** A reference to the document to be created. Value must not be null. |
48 | | var_args | **any type** Either an object containing all of the fields and values to update, or a series of arguments alternating between fields (as string or objects) and values. Value may be repeated. |
49 |
--------------------------------------------------------------------------------
/docs/messaging/android.md:
--------------------------------------------------------------------------------
1 | # Android Installation
2 |
3 | First ensure you have followed the [initial setup guide](version /installation/initial-setup).
4 |
5 | ## Add the dependency
6 |
7 | Add the Firebase Cloud Messaging dependency and optional ShortcutBadger dependency to `android/app/build.gradle`:
8 |
9 | ```groovy
10 | dependencies {
11 | // ...
12 | implementation "com.google.firebase:firebase-messaging:{{ android.firebase.messaging }}"
13 | implementation 'me.leolin:ShortcutBadger:1.1.21@aar' // <-- Add this line if you wish to use badge on Android
14 | }
15 | ```
16 |
17 | ## Install the RNFirebase Messaging package
18 |
19 | Add the `RNFirebaseMessagingPackage` to your `android/app/src/main/java/com/[app name]/MainApplication.java`:
20 |
21 | ```java
22 | // ...
23 | import io.invertase.firebase.RNFirebasePackage;
24 | import io.invertase.firebase.messaging.RNFirebaseMessagingPackage; // <-- Add this line
25 |
26 | public class MainApplication extends Application implements ReactApplication {
27 | // ...
28 |
29 | @Override
30 | protected List getPackages() {
31 | return Arrays.asList(
32 | new MainReactPackage(),
33 | new RNFirebasePackage(),
34 | new RNFirebaseMessagingPackage() // <-- Add this line
35 | );
36 | }
37 | };
38 | // ...
39 | }
40 | ```
41 |
42 | ## Update Android Manifest
43 |
44 | Add the following to `android/app/src/main/AndroidManifest.xml`:
45 |
46 | Within the application component, add the messaging service:
47 | ```xml
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | ```
58 |
59 | **For RNFB versions less than 5.2.0 only**; add the instance ID service:
60 | ```xml
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | ```
71 |
72 | ## (Optional) Background Messages
73 |
74 | If you want to be able to react to data-only messages when your app is in the background, e.g. to display a heads up notification, then you need to add the following to `android/app/src/main/AndroidManifest.xml`:
75 |
76 | ```xml
77 |
78 |
79 |
80 | ```
81 |
82 | You'll also need to check out the optional steps as part of our [Receiving Messages guide](version /messaging/receiving-messages).
83 |
--------------------------------------------------------------------------------
/docs/analytics/reference/analytics.md:
--------------------------------------------------------------------------------
1 | # Analytics
2 |
3 | ```
4 | firebase.analytics
5 | ```
6 |
7 | ## Methods
8 |
9 | The following methods are accessed via the Analytics instance `firebase.analytics()`.
10 |
11 | ### logEvent
12 | [method]logEvent(event, params) returns void;[/method]
13 |
14 | Log a custom event with optional params.
15 | Note: up to 100 characters is the maximum character length supported for event parameters.
16 |
17 | | Parameter | |
18 | | --------- | ------- |
19 | | event | **string** |
20 | | params | **object** |
21 |
22 | ### setAnalyticsCollectionEnabled
23 | [method]setAnalyticsCollectionEnabled(enabled) returns void;[/method]
24 |
25 | If true, allows the device to collect analytical data and send it to Firebase.
26 |
27 | | Parameter | |
28 | | --------- | ------- |
29 | | enabled | **boolean** |
30 |
31 | ### setCurrentScreen
32 | [method]setCurrentScreen(screenName, screenClassOverride) returns void;[/method]
33 |
34 | Sets the current screen name.
35 |
36 | ?> Whilst `screenClassOverride` is optional, it is recommended it is always sent as your current class name, for example on Android it will always show as 'MainActivity' if not specified.
37 |
38 | | Parameter | |
39 | | --------- | ------- |
40 | | screenName | **string** |
41 | | screenClassOverride | **string** (optional) |
42 |
43 | ### setMinimumSessionDuration
44 | [method]setMinimumSessionDuration(miliseconds) returns void;[/method]
45 |
46 | Sets the minimum engagement time required before starting a session. The default value is 10000 (10 seconds).
47 |
48 | | Parameter | |
49 | | --------- | ------- |
50 | | miliseconds | **number** |
51 |
52 | ### setSessionTimeoutDuration
53 | [method]setSessionTimeoutDuration(miliseconds) returns void;[/method]
54 |
55 | Sets the duration of inactivity that terminates the current session. The default value is 1800000 (30 minutes).
56 |
57 | | Parameter | |
58 | | --------- | ------- |
59 | | miliseconds | **number** |
60 |
61 | ### setUserId
62 | [method]setUserId(id) returns void;[/method]
63 |
64 | Gives a user a unique identification.
65 |
66 | | Parameter | |
67 | | --------- | ------- |
68 | | id | **string** |
69 |
70 | ### setUserProperty
71 | [method]setUserProperty(name, value) returns void;[/method]
72 |
73 | Sets a key/value pair of data on the current user.
74 |
75 | | Parameter | |
76 | | --------- | ------- |
77 | | name | **string** |
78 | | value | **string** |
79 |
80 | ### setUserProperties
81 | [method]setUserProperties(fieldMapping) returns void;[/method]
82 |
83 | Sets mutiple key/value pair of data on the current user.
84 | Param object's keys are property value and values are values.
85 |
86 |
87 | | Parameter | |
88 | | --------- | ------- |
89 | | fieldMapping | **object** |
90 |
--------------------------------------------------------------------------------
/docs/admob/reference/admob.md:
--------------------------------------------------------------------------------
1 | # Admob
2 |
3 | ```
4 | firebase.admob
5 | ```
6 |
7 | ## Methods
8 |
9 | The following methods are accessed via the Admob instance `firebase.admob()`.
10 |
11 | ### initialize
12 | [method]initialize(id) returns void;[/method]
13 |
14 | Before using any AdMob feature, ensure you call the initialize method. This only needs to be done once per the apps lifecycle. Initialize takes your AdMob App ID, where you can find on your AdMob dashboard.
15 |
16 | For testing purposes, you can use the Admob test app ID "ca-app-pub-3940256099942544~3347511713"
17 |
18 | | Parameter | |
19 | | --------- | ------- |
20 | | id | **string** |
21 |
22 | ### openDebugMenu
23 | [method]openDebugMenu() returns void;[/method]
24 |
25 | Opens a debug menu, allowing you to test your ads. This menu cannot be closed unless you reload your app.
26 |
27 | ### interstitial
28 | [method]interstitial(unitId) returns [ref admob.Interstitial];[/method]
29 |
30 | Returns a new [ref admob.Interstitial] to be loaded with a given unitId.
31 |
32 | | Parameter | |
33 | | --------- | ------- |
34 | | unitId | **string** Ad unitId |
35 |
36 | ### rewarded
37 | [method]rewarded(unitId) returns [ref admob.RewardedVideo];[/method]
38 |
39 | Returns a new [ref admob.RewardedVideo] to be loaded with a given unitId.
40 |
41 | | Parameter | |
42 | | --------- | ------- |
43 | | unitId | **string** Ad unitId |
44 |
45 | ## Statics
46 |
47 | ### Banner
48 | [method]Banner returns [ref admob.Banner];[/method]
49 |
50 | Returns a [ref admob.Banner] component.
51 |
52 | ### NativeExpress
53 | [method]NativeExpress returns [ref admob.NativeExpress];[/method]
54 |
55 | Returns a [ref admob.NativeExpress] component.
56 |
57 | ### AdRequest
58 | [method]AdRequest returns [ref admob.AdRequest];[/method]
59 |
60 | Returns a [ref admob.AdRequest] class.
61 |
62 | ### VideoOptions
63 | [method]VideoOptions returns [ref admob.VideoOptions];[/method]
64 |
65 | Returns a [ref admob.VideoOptions] class.
66 |
67 | ## Types
68 |
69 | ### EventTypes
70 | [method]VideoOptions returns [EventTypes](https://github.com/invertase/react-native-firebase/blob/master/src/modules/admob/EventTypes.js#L2);[/method]
71 |
72 | Returns an `Object` containing Admob event types.
73 |
74 | ### RewardedVideoEventTypes
75 | [method]RewardedVideoEventTypes returns [RewardedVideoEventTypes](https://github.com/invertase/react-native-firebase/blob/master/src/modules/admob/EventTypes.js#L10);[/method]
76 |
77 | Returns an `Object` containing [RewardedVideo](#rewarded) event types.
78 |
79 | ### NativeExpressEventTypes
80 | [method]NativeExpressEventTypes returns [NativeExpressEventTypes](https://github.com/invertase/react-native-firebase/blob/master/src/modules/admob/EventTypes.js#L18);[/method]
81 |
82 | Returns an `Object` containing [NativeExpress](#NativeExpress) event types.
83 |
--------------------------------------------------------------------------------
/docs/notifications/displaying-notifications.md:
--------------------------------------------------------------------------------
1 | # Displaying Notifications
2 |
3 | When your app is in the foreground, you can choose to present a notification to the user.
4 |
5 | > iOS 9 does not support displaying a notification whilst the app is in the foreground
6 |
7 | ----
8 |
9 | ?> For Android notifications it is highly recommended that you read through the official [Android Notifications Overview](https://developer.android.com/guide/topics/ui/notifiers/notifications) page and also use it as a reference during development; e.g. if your Heads-up notification is not showing then see the `Heads-up notification` section which explains the conditions and versions that will trigger a notification to display in Heads-up form.
10 |
11 |
12 | ## 1) Building a notification
13 |
14 | React Native Firebase provides a [ref notifications.Notification] class which works as a builder to allow you to construct a notification. This [ref notifications.Notification] class contains all the generic notification functionality that is shared between Android and iOS.
15 |
16 | ```js
17 | const notification = new firebase.notifications.Notification()
18 | .setNotificationId('notificationId')
19 | .setTitle('My notification title')
20 | .setBody('My notification body')
21 | .setData({
22 | key1: 'value1',
23 | key2: 'value2',
24 | });
25 | ```
26 |
27 | For the full set of shared parameters that can be set, please see the [ref notifications.Notification] reference docs.
28 |
29 | ### Android specific functionality
30 |
31 | As Android provides some bespoke notification functionality, we have segregated this into an [ref notifications.AndroidNotification] class. This is accessible on the notification you created above, as follows:
32 |
33 | ```js
34 | notification
35 | .android.setChannelId('channelId')
36 | .android.setSmallIcon('ic_launcher');
37 | ```
38 |
39 | For the full set of Android-specific parameters that can be set, please see the [ref notifications.AndroidNotification] reference docs.
40 |
41 | ### iOS specific functionality
42 |
43 | As iOS provides some bespoke notification functionality, we have segregated this into an [ref notifications.IOSNotification] class. This is accessible on the notification you created above, as follows:
44 |
45 | ```js
46 | notification
47 | .ios.setBadge(2);
48 | ```
49 |
50 | For the full set of iOS-specific parameters that can be set, please see the [ref notifications.IOSNotification] reference docs.
51 |
52 | ## 2) Display the notification
53 |
54 | ### (Android) Set up a notification channel
55 |
56 | Before you can display a notification on Android, you must ensure you have created a Notification Channel, as explained [here](version /notifications/android-channels).
57 |
58 | ### Display the notification
59 |
60 | ```js
61 | // Build notification as above
62 | const notification = ...;
63 | // Display the notification
64 | firebase.notifications().displayNotification(notification)
65 | ```
66 |
--------------------------------------------------------------------------------
/docs/perf-mon/reference/HttpMetric.md:
--------------------------------------------------------------------------------
1 | # HttpMetric
2 |
3 | ?> **Upcoming Change Notification:** Note that this API is likely to change in v6.0.0 to convert all Trace / HttpMetric methods (except start & stop) to be synchronous JS side methods. The API implemented currently is an initial draft to allow early access.
4 |
5 | > Once a trace has been started and stopped, you cannot re-start it in the same app lifecycle.
6 |
7 | ## start
8 | [method]httpMetric.start() returns Promise;[/method]
9 |
10 | Initializes the http metric to start.
11 |
12 | ## stop
13 | [method]httpMetric.stop() returns Promise;[/method]
14 |
15 | Stops performance tracing. The completed trace stats are now sent to Firebase.
16 |
17 | > Results are not realtime. They can take a number of hours to appear in the Firebase console.
18 |
19 | ## getAttribute
20 | [method]httpMetric.getAttribute(attribute) returns Promise;[/method]
21 |
22 | Returns an attribute value, or null if it does not exist.
23 |
24 | | Parameter | |
25 | | --------- | ------- |
26 | | attribute | **string** |
27 |
28 | ## getAttributes
29 | [method]httpMetric.getAttributes() returns Promise