AdMob Banner not showing
I'm trying to show banner ads through Google AdMob in my Unity 3D game, but am unable to get them to display in the app.
I am building for iOS only and am following the documentation here: https://developers.google.com/admob/unity/start
These are the versions I am using:
Unity Version: 2017.1.0f3
AdMob: v3.6.3
xCode: Version 8.3.3
Testing: iPhone 7+ w/ iOS 10.3.3 (via TestFlight)
In Unity, I'm seeing the "Banner requested" and "Banner shown" messages show in the console as a result of Debug.Log. I'm also seeing the create, load, and show for the Bannerview in the console:
GoogleMobileAds.Common.DummyClient:CreateBannerView(String, AdSize, AdPosition)
GoogleMobileAds.Api.BannerView:LoadAd(AdRequest)
GoogleMobileAds.Common.DummyClient:ShowBannerView()
However, I still am not seeing any banner ads display in the game.
I've seen on some other related questions where the answers says that it can take some time for AdMob to register your account properly, and that ads don't display right away. However, that does not seem to be the case as I have had this ad unit created in AdMob for about a week and have had this app build on my device via TestFlight for a few days now.
Below are the relevant sections of code.
Any idea why the banner ads are not showing? Would really appreciate help on this!
using System;
using UnityEngine;
using GoogleMobileAds;
using GoogleMobileAds.Api;
if(vars.bannerActive){
RequestBanner ();
Debug.Log ("Banner requested");
bannerView.Show ();
Debug.Log ("Banner shown");
}
private void RequestBanner()
{
#if UNITY_ANDROID
string adUnitId = vars.adMobBannerID;
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-140832337799xxxx/615064xxxx";
#else
string adUnitId = "unexpected_platform";
#endif
bannerView = new BannerView(adUnitId, AdSize.Banner, bannerPos[vars.bannerAdPoisiton]);
AdRequest request = new AdRequest.Builder().Build();
bannerView.LoadAd(request);
}