0
votes

I tried to integrate GoogleAdMob - Interstitial for one of my application. here its showing.

interstitial:didFailToReceiveAdWithError: Request Error: No ad to show.
Ad wasn't ready

At AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [GADMobileAds configureWithApplicationID:@"AppID Value"];

    return YES;

}

At ViewController

    static NSString *const GADAdUnitID = @"ADUnitId Value";
    #pragma mark - googleAdsMobile
    - (GADInterstitial *)createAndLoadInterstitial {

        GADInterstitial *interstitial =
        [[GADInterstitial alloc] initWithAdUnitID:GADAdUnitID];
        interstitial.delegate = self;
        GADRequest *request = [GADRequest request];
        request.testDevices = @[ @"some value"];
        [interstitial loadRequest:request];
        return interstitial;
    }

/// Tells the delegate an ad request succeeded.
- (void)interstitialDidReceiveAd:(GADInterstitial *)ad {
    NSLog(@"interstitialDidReceiveAd");
}

/// Tells the delegate an ad request failed.
- (void)interstitial:(GADInterstitial *)ad
didFailToReceiveAdWithError:(GADRequestError *)error {
    NSLog(@"interstitial:didFailToReceiveAdWithError: %@", [error localizedDescription]);
}

/// Tells the delegate that an interstitial will be presented.
- (void)interstitialWillPresentScreen:(GADInterstitial *)ad {
    NSLog(@"interstitialWillPresentScreen");
}

/// Tells the delegate the interstitial is to be animated off the screen.
- (void)interstitialWillDismissScreen:(GADInterstitial *)ad {
    NSLog(@"interstitialWillDismissScreen");
}

/// Tells the delegate the interstitial had been animated off the screen.
- (void)interstitialDidDismissScreen:(GADInterstitial *)ad {
    NSLog(@"interstitialDidDismissScreen");
    self.interstitial = [self createAndLoadInterstitial];

}

/// Tells the delegate that a user click will open another app
/// (such as the App Store), backgrounding the current app.
- (void)interstitialWillLeaveApplication:(GADInterstitial *)ad {
    NSLog(@"interstitialWillLeaveApplication");
}

No ads showing on application.

Do I need to pay for subscription to googleAdMob for showing ads?

enter image description here

After link with firebase the Admob google i got above Ads. but I do not see real Ads yet. I was confused what I missed to get the application into run real ads on iPhone device.

Once the interstitial test ad from AdMob show prompt the below message.

 _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}

I am expecting a real Ad here.

3

3 Answers

0
votes

Google suggests to either use a test device or use a sample ad unit ID.

Does it work if you remove the line for setting the test device and use this test ad unit ID, that I have from Google‘s website?

ca-app-pub-3940256099942544/4411468910
0
votes

To get real ads from Google you have to register on Google's website and make an account. Then you have to register your app in the dashboard and are able to create placements for interstitials or banners or whatever you like to. When you have created those, you get ad unit IDs for real traffic and real revenues. From then on you can observe the revenues for each placement in the Google dashboard.

Have you registered on this site?

https://www.google.com/admob/?utm_source=google%20developers&utm_medium=et&utm_campaign=googledevproductsadmob&utm_content=ads

0
votes

If anyone has this problem check that in your AdMob page -> apps - your app - appSettings, your app is linked with the app store. I had forgot to link mine and it was the problem for me.