0

I have the next issue with admob. I created app for iOS 8 in swift using the latest admob sdk and I when I debug this app on the simulator I see test ads, when I debug on the real device I see the real ads. But when I published the app to the app store I see test ads.

I have not set up any test ads on the device or in the account adb it must show ads in simulator only, but I see test ads in release build on the AppStore.

Maybe I doing something wrong? I have not requested testing on any device so it must show me real ads on any real device but it does not.

My code

override func viewDidLoad() {
    super.viewDidLoad()

    self.bannerView.adUnitID = "my id"
    self.bannerView.rootViewController = self
    var request:GADRequest = GADRequest()


    self.bannerView.loadRequest(request)

    //other setup code which is not related to ads

    let tracker = GAI.sharedInstance().defaultTracker

    let build = GAIDictionaryBuilder.createAppView().set("Custom event", forKey: kGAIScreenName).build() as NSDictionary
    tracker.send(build as [NSObject : AnyObject])
}

Other controller

override func viewDidLoad() {
    super.viewDidLoad()

    var interstitial : GADInterstitial = GADInterstitial()
    interstitial.adUnitID = "interstitial ad id"

    var request: GADRequest = GADRequest()

    interstitial.loadRequest(request)
    //other setup code not related to ads
}
Sergey Pekar
  • 8,555
  • 7
  • 47
  • 54
  • are you testing on real device ? – Mayank Jain Jul 06 '15 at 13:48
  • Check my answer here: http://stackoverflow.com/a/30033529/2108547 – Daniel Storm Jul 06 '15 at 13:50
  • @DanielStorm thank you for your answer but I don't have any code like this request.testDevices – Sergey Pekar Jul 06 '15 at 14:00
  • Can you reproduce this on a non developer device that has downloaded your app from the App Store? – Daniel Storm Jul 06 '15 at 14:10
  • @DanielStorm on non developer device I don't see ads at all. But device that I used for testing shows test ads when I download app from the AppStore – Sergey Pekar Jul 07 '15 at 05:26
  • Edit your question to include the code how you're creating your AdMob ad and its delegate methods. – Daniel Storm Jul 07 '15 at 11:56
  • @DanielStorm added the code – Sergey Pekar Jul 08 '15 at 11:54
  • Where are your delegate methods to handle ad events? How come you're not creating your `GADInterstitial` globally? Is your `bannerView` added via interface builder? Is it using auto layout correctly? Did you verify that your AdMob ad unit IDs don't contain any typos? These are just a few things that jump out to me initially. Please add your delegate methods to your question. – Daniel Storm Jul 08 '15 at 12:04

1 Answers1

0

I was provided by wrong advertiser id. So fix is obvious - just recheck your ad unit id before release.

Sergey Pekar
  • 8,555
  • 7
  • 47
  • 54