mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-05 22:39:10 +08:00
Break out android/ios admob keys
This commit is contained in:
@@ -50,7 +50,8 @@ Add the ID to your root level `firebase.json` file under the `react-native` obje
|
||||
```json
|
||||
{
|
||||
"react-native": {
|
||||
"admob_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
|
||||
"admob_app_id_android": "ca-app-pub-xxxxxxxx~xxxxxxxx",
|
||||
"admob_app_id_ios": "ca-app-pub-xxxxxxxx~xxxxxxxx"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -172,6 +173,6 @@ import { InterstitialAd, TestIds } from '@react-native-firebase/admob';
|
||||
// Create a new instance
|
||||
const interstitialAd = InterstitialAd.createForAdRequest(TestIds.INTERSTITIAL, {
|
||||
requestNonPersonalizedAdsOnly: true,
|
||||
keywords: ['fashion', 'clothing']
|
||||
keywords: ['fashion', 'clothing'],
|
||||
});
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ def firebaseJSONAdmobAppIDString = ""
|
||||
def firebaseJSONAdmobDelayAppMeasurementInitBool = false
|
||||
|
||||
if (rootProject.ext.firebaseJson) {
|
||||
firebaseJSONAdmobAppIDString = rootProject.ext.firebaseJson.getStringValue("admob_app_id", "")
|
||||
firebaseJSONAdmobAppIDString = rootProject.ext.firebaseJson.getStringValue("admob_app_id_android", "")
|
||||
firebaseJSONAdmobDelayAppMeasurementInitBool = rootProject.ext.firebaseJson.isFlagEnabled("admob_delay_app_measurement_init")
|
||||
}
|
||||
|
||||
|
||||
17
packages/admob/lib/index.d.ts
vendored
17
packages/admob/lib/index.d.ts
vendored
@@ -1205,13 +1205,26 @@ declare module '@react-native-firebase/app' {
|
||||
namespace ReactNativeFirebase {
|
||||
interface FirebaseJsonConfig {
|
||||
/**
|
||||
* The Google AdMob application App ID.
|
||||
* The Google AdMob application App ID for Android.
|
||||
*
|
||||
* This can be found under: Apps > App settings > App ID on the Google AdMob dashboard.
|
||||
*
|
||||
* For testing purposes, use the App ID: `ca-app-pub-3940256099942544~3347511713`.
|
||||
*
|
||||
* @android
|
||||
*/
|
||||
admob_app_id: string;
|
||||
admob_app_id_android: string;
|
||||
|
||||
/**
|
||||
* The Google AdMob application App ID for iOS.
|
||||
*
|
||||
* This can be found under: Apps > App settings > App ID on the Google AdMob dashboard.
|
||||
*
|
||||
* For testing purposes, use the App ID: `ca-app-pub-3940256099942544~1458002511`.
|
||||
*
|
||||
* @ios
|
||||
*/
|
||||
admob_app_id_ios: string;
|
||||
|
||||
/**
|
||||
* By default, the Google Mobile Ads SDK initializes app measurement and begins sending user-level event data to
|
||||
|
||||
Reference in New Issue
Block a user