Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't display ad on iOS #20

Open
thibka opened this issue Jun 11, 2014 · 1 comment
Open

Can't display ad on iOS #20

thibka opened this issue Jun 11, 2014 · 1 comment

Comments

@thibka
Copy link

thibka commented Jun 11, 2014

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 thibka changed the title iOS build fails (but it's cool on Android) Can't display ad on iOS Jun 11, 2014
@thibka
Copy link
Author

thibka commented Jun 12, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant