Skip to content

Commit

Permalink
fix: update demo ad ids
Browse files Browse the repository at this point in the history
  • Loading branch information
dylancom committed Dec 5, 2023
1 parent 6ff48d6 commit 324c213
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion RNGoogleMobileAdsExample/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ class BannerTest implements Test {
return (
<View ref={onMount}>
<BannerAd
unitId={TestIds.BANNER}
unitId={
this.bannerAdSize.includes('ADAPTIVE_BANNER')
? TestIds.ADAPTIVE_BANNER
: TestIds.BANNER
}
size={this.bannerAdSize}
requestOptions={{
requestNonPersonalizedAdsOnly: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/displaying-ads.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ a banner:
import React from 'react';
import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads';

const adUnitId = __DEV__ ? TestIds.BANNER : 'ca-app-pub-xxxxxxxxxxxxx/yyyyyyyyyyyyyy';
const adUnitId = __DEV__ ? TestIds.ADAPTIVE_BANNER : 'ca-app-pub-xxxxxxxxxxxxx/yyyyyyyyyyyyyy';

function App() {
return (
Expand Down
8 changes: 6 additions & 2 deletions src/TestIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,20 @@ export const TestIds = {
GAM_NATIVE: '/6499/example/native',
...Platform.select({
android: {
APP_OPEN: 'ca-app-pub-3940256099942544/3419835294',
APP_OPEN: 'ca-app-pub-3940256099942544/9257395921',
ADAPTIVE_BANNER: 'ca-app-pub-3940256099942544/9214589741',
BANNER: 'ca-app-pub-3940256099942544/6300978111',
INTERSTITIAL: 'ca-app-pub-3940256099942544/1033173712',
INTERSTITIAL_VIDEO: 'ca-app-pub-3940256099942544/8691691433',
REWARDED: 'ca-app-pub-3940256099942544/5224354917',
REWARDED_INTERSTITIAL: 'ca-app-pub-3940256099942544/5354046379',
},
ios: {
APP_OPEN: 'ca-app-pub-3940256099942544/5662855259',
APP_OPEN: 'ca-app-pub-3940256099942544/5575463023',
ADAPTIVE_BANNER: 'ca-app-pub-3940256099942544/2435281174',
BANNER: 'ca-app-pub-3940256099942544/2934735716',
INTERSTITIAL: 'ca-app-pub-3940256099942544/4411468910',
INTERSTITIAL_VIDEO: 'ca-app-pub-3940256099942544/5135589807',
REWARDED: 'ca-app-pub-3940256099942544/1712485313',
REWARDED_INTERSTITIAL: 'ca-app-pub-3940256099942544/6978759866',
},
Expand Down

0 comments on commit 324c213

Please sign in to comment.