0
votes

i want to be able to request interstitial test ads on iOS on the simulator this is the code I'm using

interstitial_ = [[GADInterstitial alloc] init];
interstitial_.adUnitID = @"XXXXXXXXXXXXXXXX";
[interstitial_ loadRequest:[GADRequest request]];
interstitial_.delegate = self;

thanks.

1

1 Answers

0
votes

Not sure about your specific question. But, the Google Mobile Ads SDK documentation is very rich. Here's the code which I often use -

- (void)loadAdMobIntersBanner
{
    interstitial_ = [[GADInterstitial alloc] init];
    interstitial_.adUnitID = @"ca-app-pub-xxxxxxxxx/xxxxxxx";
    interstitial_.delegate = self;
    GADRequest *request = [GADRequest request];
    [interstitial_ loadRequest:request];
}

- (void)interstitialDidReceiveAd:(GADInterstitial *)ad
{
    [interstitial_ presentFromRootViewController:self];
}