# Unable to get AdMob banner to show up on Ionic iOS app

**URL:** <https://forum.ionicframework.com/t/unable-to-get-admob-banner-to-show-up-on-ionic-ios-app/52722>\
**Category:** ionic-v1\
**Created:** [May 23, 2016, 6:05am UTC](https://forum.ionicframework.com/t/unable-to-get-admob-banner-to-show-up-on-ionic-ios-app/52722 "2016-05-23T06:05:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evensteven](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@Evensteven](https://forum.ionicframework.com/u/Evensteven)\
**Post date:** [May 23, 2016, 6:05am UTC](https://forum.ionicframework.com/t/unable-to-get-admob-banner-to-show-up-on-ionic-ios-app/52722/1 "2016-05-23T06:05:10Z")

</div>

Hi, I’m running Ionic v1.3 and cordova 6.1.1. I followed these 2 popular and similar tutorials about adding AdMob to an Ionic app:

> **[Using Admob With Ionic Framework](https://www.thepolyglotdeveloper.com/2014/06/using-admob-ionicframework/)**
>
> Monetize your cross platform mobile application by using Google Admob with Ionic Framework to serve advertisements.

  
[http://www.nikola-breznjak.com/blog/codeproject/adding-admob-to-ionic-framework-application-step-by-step/](http://www.nikola-breznjak.com/blog/codeproject/adding-admob-to-ionic-framework-application-step-by-step/)

At first I ran into an issue trying to install the plugin that couldn’t be found: `cordova plugin add com.rjfun.cordova.plugin.admob`

I read that if i’m running Cordova v5 or higher to use this plugin instead: [https://github.com/floatinghotpot/cordova-admob-pro](https://github.com/floatinghotpot/cordova-admob-pro)

My Question is how do I call the AdMob plugin? There are examples showing a separate “AdMob.js” file or calling the code from “App.js” inside the function:

```
.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    // INSERT ADMOB HERE?
  {
});

```

And does anyone have an example of what their AdMob code looks like just for a banner? Does it look like this?

```
.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.AdMob) {

      var admob_key = device.platform == "Android" ? "ANDROID_PUBLISHER_KEY" : "IOS_PUBLISHER_KEY";
      var admob = window.cordova.plugins.AdMob;
      admob.createBannerView( 
          {
              'publisherId': admob_key,
              'adSize': admob.AD_SIZE.BANNER,
              'bannerAtTop': false
          }, 
          function() {
              admob.requestAd(
                  { 'isTesting': true }, 
                  function() {
                      admob.showAd(true);
                  }, 
                  function() { console.log('failed to request ad'); }
              );
          }, 
          function() { console.log('failed to create banner view'); }
      );
  }
  {
});

```

Am I forgetting something super easy? Is there a way to test to make sure I loaded the AdMobPro plugin?

Thanks in advance 🙂
