cordova-plugin-admob icon indicating copy to clipboard operation
cordova-plugin-admob copied to clipboard

Can't display ad on iOS

Open thibka opened this issue 10 years ago • 1 comments

Hey, here is my code. It works nicely on Android but it doesn't work on iOS. In the Xcode emulator I have a white empty banner, on an iPhone 3 device, nothing happens at all.

var admob_ios_key = 'ca-app-pub-6068517762438360/4083177731';
var admob_android_key = 'ca-app-pub-6068517762438360/7720118534';
var adId = (navigator.userAgent.indexOf('Android') >=0) ? admob_android_key : admob_ios_key;


admob.createBannerView(
     {
       'publisherId': adId,
       'adSize': admob.AD_SIZE.BANNER
     },
     function(){
          admob.requestAd(
          {
          'isTesting': false,
          'extras': {
          'color_bg': 'AAAAFF',
          'color_bg_top': 'FFFFFF',
          'color_border': 'FFFFFF',
          'color_link': '000080',
          'color_text': '808080',
          'color_url': '008000'
          },
          },
          function(){

          },
          function(){
            alert("request error");
          }
          );
     },
     function(){
      alert("create error")
     }
      );

Any idea what's going on ?

thibka avatar Jun 11 '14 15:06 thibka

It finally worked. Didn't change anything, I haven't got a clue what happened.

thibka avatar Jun 12 '14 10:06 thibka