Ads work fine in production version of Android but not iOS


#1

I am trying to show ads in my app using the ad-mob-free plugin but its not working for iOS on development or production mode. It works fine for Android on both. I can’t figure out the problem. I have double checked that my key is correct for iOS already.

Ionic info

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.0.1 

local packages:

    @ionic/app-scripts : 3.0.0-201710101530
    Cordova Platforms  : android 6.4.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.8.0

System:

    ios-deploy : 1.9.2 
    ios-sim    : 6.1.2 
    Node       : v7.9.0
    npm        : 5.5.1 

package.json

"@ionic-native/admob-free": "4.7.0",

config.xml

<engine name="android" spec="^6.4.0" />
<engine name="ios" spec="^4.5.4" />
<plugin name="cordova-plugin-admob-free" spec="^0.15.0" />

ad.component.ts

const bannerConfig: AdMobFreeBannerConfig = {
  isTesting: false, 
  autoShow: true,
  id: this.unitID,
  bannerAtTop: false,
  overlap: false,
};

this.admob.banner.config(bannerConfig);
const ad = this.admob.banner.prepare().then(() =>
{
  console.log("ad is showing");
}).catch(e => console.log("AD ERROR " + e));