Skip to content

Instantly share code, notes, and snippets.

@NomiJ
Last active August 29, 2015 14:18
Show Gist options
  • Save NomiJ/8774a1ba3d313a21bf49 to your computer and use it in GitHub Desktop.
Save NomiJ/8774a1ba3d313a21bf49 to your computer and use it in GitHub Desktop.
self.bannerView.adUnitID = @"ca-app-pub-2419065877396512/3970156383";
self.bannerView.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 = @[
@"B4E061FD36E2EE0485E9DC5E2CAC6CC0C1605E2E", // Tam's iAssDevice
@"319618BF7AB6B259CE3DE8ED278CFE2D22A762AB"
];
[request tagForChildDirectedTreatment:YES];
[self.bannerView loadRequest:request];
}
else{
[self.bannerView removeFromSuperview];
self.bannerView = nil;
}
self.bottomBanner.adUnitID = @"ca-app-pub-2419065877396512/2149209183";
self.bottomBanner.rootViewController = self;
GADRequest *request1 = [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.
request1.testDevices = @[
@"B4E061FD36E2EE0485E9DC5E2CAC6CC0C1605E2E", // Tam's iAssDevice
@"319618BF7AB6B259CE3DE8ED278CFE2D22A762AB"
];
[request1 tagForChildDirectedTreatment:YES];
[self.bottomBanner loadRequest:request1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment