Interstitial Ads

Interstitial Ads are loaded automatically. You can observe ad loading events by specifying the delegate:

BIDInterstitial *interstitial = [BIDInterstitial new];
interstitial.loadDelegate = loadDelegate;

The delegate should implement the following methods:

#pragma mark - BIDFullscreenLoadDelegate protocol methods

- (void)didLoadAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didLoadAd. AdInfo: %@", adView, adInfo);
}

- (void)didFailToLoadAd:(BIDAdInfo*)adInfo error:(NSError *)error
{
    NSLog(@"Interstitial - didFailToLoadAd. AdInfo: %@. Error: %@", adInfo, error);
}

Showing an Interstitial Ad

To show an interstitial ad, call showWithDelegate instance method of the BIDInterstitial class:

[interstitial showWithDelegate:theDelegate];

The delegate should implement the following methods:

#pragma mark - BIDInterstitialDelegate protocol mehods

//TODO: simplify this method. It should simply return the appropriate View Controller to display ad
- (UIViewController*)viewControllerForDisplayAd
{
    return viewController;
}

- (void)didDisplayAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didDisplayAd. AdInfo: %@", adView, adInfo);
}

- (void)didClickAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didClickAd. AdInfo: %@", adView, adInfo);
}

- (void)didHideAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didHideAd. AdInfo: %@", adView, adInfo);
}

- (void)didFailToDisplayAd:(BIDAdInfo*)adInfo error:(NSError *)error
{
    NSLog(@"Interstitial - didFailToDisplayAd. AdInfo: %@ Error: %@", adInfo, error);
}

-(void)allNetworksDidFailToDisplayAd
{
    NSLog(@"Interstitial - allNetworksDidFailToDisplayAd");
}

Stopping and Starting Auto-Load

By default, Interstitials preload ads before any load attempt. So an Interstitial can use already preloaded ads instead of waiting on a manual load call to load new ads. To disable this feature you need to call the following method:

interstitial.autoload = NO;

Once you disable autoload, you should load ads manually every time you need them to show:

[interstitial load];

Last updated