So I’m using the cordova-plugin-admobpro
https://ionicframework.com/docs/native/admob/ and I have a blank white banner even if I set isTesting: true
, so It should at least display a test banner, it does that on Android, but on ios is just a white blank banner.
loadAd(){
let options = {};
if (/(android)/i.test(navigator.userAgent)) {
let options = {
adId: 'ca-app-pub-9002872999358xxx/3701663xxx',
isTesting: false,
position : AdMob.AD_POSITION.BOTTOM_CENTER,
autoShow : true,
adExtras : {color_bg : '#eff2f4'}
};
} else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
let options = {
adId: 'ca-app-pub-90028729993xxxx5/xx14005xxx',
isTesting: true,
position : AdMob.AD_POSITION.BOTTOM_CENTER,
autoShow : false,
adExtras : {color_bg : '#eff2f4'}
};
}
AdMob.createBanner(options).then(() => {
AdMob.showBanner(AdMob.AD_POSITION.BOTTOM_CENTER);
});
}
ionViewDidLoad() {
this.platform.ready().then(() => {
if (this.platform.is('cordova')) {
this.loadAd();
}
On Xcode I get this:
AdMob, onAdFailLoad, {‘adNetwork’:‘AdMob’,‘adType’:‘banner’,‘adEvent’:‘onAdFailLoad’,‘error’:1,‘reason’:‘Request Error: No ad to show.’}
2017-04-29 11:28:25.079575[40029:6283276] Unable to connect to FCM. Error Domain=com.google.fcm Code=2001 “(null)”
Any help on solving this? maybe more debugging tips.