If I create a new project of the same kind in Xcode 5.0.2, add the iAd Framework by implementing the ADInterstitialAdDelegate in ViewController.h
#import <UIKit/UIKit.h> #import <iAd/iAd.h> @interface ViewController : UIViewController <ADInterstitialAdDelegate> @end
and delegate methods in ViewController.m
-(void)viewDidLoad { [super viewDidLoad]; [ self performSelector:@selector(onDelay) withObject:nil afterDelay:2 ]; } -(void)onDelay { self.interstitialPresentationPolicy = ADInterstitialPresentationPolicyManual; [ self requestInterstitialAdPresentation ]; } -(void)interstitialAd:(ADInterstitialAd *)interstitialAd didFailWithError:(NSError *)error { NSLog(@"interstitialAd didFailWithError"); } -(void)interstitialAdDidLoad:(ADInterstitialAd *)interstitialAd { NSLog(@"interstitialAdDidLoad"); }
none of the ADInterstitialAdDelegate methods are called . I am also experiencing some problems using the old implementation in iOS 6 and below.
interstitial = [[ADInterstitialAd alloc] init]; interstitial.delegate = self; [ interstitial presentFromViewController:self ];
Only
-(void)interstitialAdDidLoad:(ADInterstitialAd *)interstitialAd
called then but no
- (void)interstitialAdDidUnload:(ADInterstitialAd *)interstitialAd
after closing the ad. Does anyone remember the same problems or know what is going on here?
delegates iad interstitial
Stephan schulz
source share