Balaji G Balaji G - 2 months ago 23
iOS Question

To get test ads on this device, call: request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID, nil];

While i test Admob in simulator, it throws below error


To get test ads on this device, call: request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID, nil];


My Code

bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
bannerView_.adUnitID = @"8de66ecc3525495d";

bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];

GADRequest *request = [[GADRequest alloc] init];
request.testing = YES;
[bannerView_ loadRequest:request];


Guide me to archive it. Thanks in Advance..

Answer

At finally fix the bug friends..

I made mistake to generate adUnitID. So only i cannot get ad view.

Now get one adUnitID from xxxx site for testing. And its working fine..

adUnitID = @"a14dccd0fb24d45";

Thanks for All Supporters.

Comments