Firebase JSON Config
Configure @react-native-firebase modules
You can configure your installed modules by creating a file named
firebase.json at the root of your project directory.
An example configuration file is available for inspection in our internal test app:
Add the Config Schema to your
firebase.json file to use the Editor Intellisense
If you need to deactivate Analytics collection permanently in a version of your app. This cannot be altered at runtime once set in the config.
If you wish to disable collection of the IDFV (Identifier for Vendor) in your iOS app. This cannot be altered at runtime once set in the config.
If you wish to disable collection of the Advertising ID in your Android app. This cannot be altered at runtime once set in the config.
If you wish to disable collection of SSAID (Settings.Secure.ANDROID_ID) in your Android app,. This cannot be altered at runtime once set in the config.
If you wish to disable automatic screen reporting in your app. This cannot be altered at runtime once set in the config.
For your convenience, on iOS the SDK automatically registers your app with Apple for ad network attribution with SKAdNetwork. Defaults to true, include this key as false to disable.
Enables storage (such as app identifiers) related to analytics, e.g. visit duration.
Enables storage (such as device identifiers) related to advertising.
Sets consent for sending user data to Google for advertising purposes.
Configure whether a user's Analytics data may be used for personalized advertising in other products. If set, may be overridden at runtime by calling setUserProperty on the key 'allow_personalized_ads'
Set the log level across all modules. Only applies to iOS currently. Can be 'error', 'warn', 'info', 'debug'. Logs messages at the configured level or lower. Note that if an app is running from AppStore, it will never log above info even if level is set to a higher (more verbose) setting
Additionally, you can configure whether Crashlytics sends out any reports through the auto_collection_enabled option in your firebase.json config. If you want users to opt-in, it is recommended that you disable this here and enable it later through the method once they opt-in.
Stack traces are readily available while you`re debugging your app, so Crashlytics is disabled by default in debug mode. You can set Crashlytics to be enabled regardless of debug mode through the debug_enabled option in your firebase.json. This may be useful to test your integration, remembering reports are sent next app start.
React Native Firebase supports Crashlytics NDK reporting which is enabled by default. This allows Crashlytics to capture crashes originating from the Yoga layout engine used by React Native. You can disable Crashlytics NDK in your firebase.json config.
Firebase generates an Instance ID, which FCM uses to generate a registration token and which Analytics uses for data collection. When an Instance ID is generated, the library will upload the identifier and configuration data to Firebase. In most cases, you do not need to change this behavior. If you prefer to prevent Instance ID auto-generation, disable auto initialization for FCM and Analytics
On Android, a background event sent to setBackgroundMessageHandler has 60 seconds to resolve before it is automatically canceled to free up device resources. If you wish to override this value, set the number of milliseconds in your config.
On Android, any message which displays a Notification use a default Notification Channel (created by FCM called
On Android, any messages which display a Notification do not use a color to tint the content (such as the small icon, title etc). To provide a custom tint color, update the messaging_android_notification_color property with a Android color resource name. The library provides a set of predefined colors corresponding to the HTML colors for convenience
Whether RNFirebase Messaging automatically calls
On iOS, indicating how to present a notification in a foreground app.
If you need to deactivate Performance collection permanently in a version of your app. This cannot be altered at runtime once set in the config.
Maximum pool size of ThreadPoolExecutor used by RNFirebase for Android. Defaults to
Keep-alive time of ThreadPoolExecutor used by RNFirebase for Android, in seconds. Defaults to
The names (as returned by
On android devices, the urls of firebase emulators will be remapped from localhost to 10.0.2.2. If you don't need this behaviour set this fleg to