Wednesday, September 28, 2022
HomeiOS DevelopmentAdMob banner : totally different ID on iOS and Android

AdMob banner : totally different ID on iOS and Android

I am engaged on a cellular app below Flutter, and I added an advert block on my app by way of AdMob.

I’ve created 2 ‘apps’ on the AdMob web site, one Android and one iOS.
So I get a distinct ID for every of my components.

The 2 applications I created on AdMob

In my code, I did it like this, is it the proper resolution?

remaining BannerAd myBanner = BannerAd(
    adUnitId: (Platform.isAndroid) ? 'ca-app-pub-xxxxxxxxxxxxxxxxx/yyyyyyyyyy' : 'ca-app-pub-zzzzzzzzzzzzzzzzz/aaaaaaaaaa',
    measurement: AdSize.banner,
    request: const AdRequest(),
    listener: const BannerAdListener(),

Right here, after all, the a, x, y and z substitute the true values, however that is to indicate that I put totally different IDs for the platforms.

Thanks !



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments