我正在尝试使用 CustomEvent 在 AdMob 中介上设置 RevMob。
我已经在我的项目中设置了 GADCustomEventBanner 自定义调用,并且一切都被正确调用。但是,广告是黑色/空白的。我可以让广告展示的唯一方法是打电话
[[RevMobAds session] showBanner];
有谁知道如何使用 AdMob 中介显示 RevMob 广告的广告视图?
#import "RevMobCustomEventBanner.h"
@implementation RevMobCustomEventBanner
// Will be set by the AdMob SDK.
@synthesize delegate = delegate_;
#pragma mark -
#pragma mark GADCustomEventBanner
- (void)requestBannerAd:(GADAdSize)adSize
parameter:(NSString *)serverParameter
label:(NSString *)serverLabel
request:(GADCustomEventRequest *)customEventRequest {
NSLog(@"parameter = %@", serverParameter);
NSLog(@"label = %@", serverLabel);
NSLog(@"request = %@", customEventRequest);
if (!self.revMobBannerView) {
[RevMobAds startSessionWithAppID:@"XXXXXX"];
self.revMobBannerView = [[RevMobAds session] bannerView];
[self.revMobBannerView setDelegate:self];
}
[[self revMobBannerView] loadAd];
}
#pragma mark - RevMobAdsDelegate methods
- (void)revmobAdDidReceive {
NSLog(@"[RevMob Sample App] Ad loaded.");
[self.delegate customEventBanner:self didReceiveAd:self.revMobBannerView];
}
- (void)revmobAdDidFailWithError:(NSError *)error {
NSLog(@"[RevMob Sample App] Ad failed: %@", error);
[self.delegate customEventBanner:self didFailAd:error];
}
- (void)revmobAdDisplayed {
NSLog(@"[RevMob Sample App] Ad displayed.");
[self.delegate customEventBanner:self clickDidOccurInAd:self.revMobBannerView];
[self.delegate customEventBannerWillPresentModal:self];
}
- (void)revmobUserClosedTheAd {
NSLog(@"[RevMob Sample App] User clicked in the close button.");
[self.delegate customEventBannerWillDismissModal:self];
}
- (void)revmobUserClickedInTheAd {
NSLog(@"[RevMob Sample App] User clicked in the Ad.");
}
- (void)installDidReceive {
NSLog(@"[RevMob Sample App] Install did receive.");
}
- (void)installDidFail {
NSLog(@"[RevMob Sample App] Install did fail.");
}