如何显示真正添加到移动设备中。 我在我的iOS设备中集成了非页内广告添加。
期待实时广告进入我的应用程序。但始终会显示默认的非页内广告。
static NSString *const GADAdUnitID = AD_UNITID_KEY;
AD_UNITID_KEY taken from googleServices-Info.plist AD_UNIT_ID_FOR_INTERSTITIAL_TEST value.
#pragma mark - googleAdsMobile
- (GADInterstitial *)createAndLoadInterstitial {
GADInterstitial *interstitial =
[[GADInterstitial alloc] initWithAdUnitID:GADAdUnitID];
interstitial.delegate = self;
GADRequest *request = [GADRequest request];
[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");
}
我希望获得实时广告。
谁能让我知道我在这里做错了什么?