AdMob - Testing Vs. Publishing
So I have a Google AdMob app in my app and I am curious about a few lines of code used to display a test add when testing on a simulator or device.
This is the code I am using (as shown in Google Dev docs / tutorials ):
//log version of Google Ads used.
NSLog(@"Google Mobile Ads SDK Version: %@", [GADRequest sdkVersion]);
//Replace this ad unit ID with your own ad unit ID.
self.bannerview.adUnitID = @"ca-app-pub-3940256099942544/2934735716";
self.bannerviewB.rootViewController = self;
GADRequest *request = [GADRequest request];
//Requests test ads on devices you specify. Your test device ID is printed to
//the console when an ad request is made. GADBannerView automatically returns
//test ads when running on a simulator.
request.testDevices = @[@"2077ef9a63d2b398840261c8221a0c9a"];// Eric iPod Touch
[self.bannerviewB loadRequest:request];
My question is, do you leave the code in those checks if you are on your own device or not? This line:
//Requests test ads on devices you specify. Your test device ID is printed to
//the console when an ad request is made. GADBannerView automatically returns
//test ads when running on a simulator.
request.testDevices = @[@"2077ef9a63d2b398840261c8221a0c9a"];// Eric iPod Touch
As I recently noticed when I downloaded my app from the App Store it was still showing test ads and this could be the reason ...? I just thought about this when developing my second application.
Thank.
+3
source to share
1 answer