简体   繁体   English

通过iAd进行AdMob中介

[英]AdMob Mediation with iAd

I have a Universal iPhone/iPad application for which I am using AdMob Mediation. 我有一个要使用AdMob中介的通用iPhone / iPad应用程序。 I would like to request an iAd first, and then an AdMob if the iAd fails. 我想先请求一个iAd,然后再请求一个AdMob(如果iAd失败)。 I have the eCPM setting for iAd at $1.00 and AdMob at $0.20. 我将iAd的eCPM设置为$ 1.00,将AdMob的eCPM设置为$ 0.20。 However, I am getting an iAd fill rate of about 20%. 但是,我的iAd填充率约为20%。 I have tried numerous different eCPM settings without sucess. 我尝试了许多不同的有效每千次展示费用设置,但没有成功。 Before integrating AdMob Mediation in a recent app update, I was only using iAds and getting an iAd fill rate of about 99%. 在将AdMob中介集成到最新的应用更新中之前,我仅使用iAd,并且iAd的填充率约为99%。

Is this happening because I am using a Smart Banner? 这是因为我正在使用智能横幅吗? From what I understand, iAd does support the Smart Banner. 据我了解,iAd确实支持智能横幅。 My app only supports Portrait Mode and the Smart Banner uses a size of 320x50 for iPhone and 768x90 for iPad. 我的应用仅支持人像模式,而智能横幅广告对于iPhone使用的尺寸为320x50,对于iPad使用的尺寸为768x90。 However, according to Apple's iAd Programming Guide, an iAd is 768x66 for an iPad. 但是,根据Apple的iAd编程指南,iPad的iAd为768x66。

Is the incorrect Smart Banner size causing the iAds to fail for iPads? 智能横幅尺寸不正确是否会导致iPad的iAd广告失败? Based on my iTunes Sales reports, I have more iPad users than iPhone users. 根据我的iTunes销售报告,iPad用户多于iPhone用户。 What is the best solution for this problem? 解决此问题的最佳方法是什么? Should I stop using a Smart Banner, or should I programmatically change the size of the GADBannerView if the device is an iPad? 如果设备是iPad,我应该停止使用智能横幅,还是应该以编程方式更改GADBannerView的大小?

Make sure to import iAd , import AdMob SDK ( GADBannerView.h ) and add 确保导入iAd ,导入AdMob SDKGADBannerView.h )并添加

ADBannerView *iAd; in your .h file; 在您的.h文件中;

- (void)viewDidLoad {

    [super viewDidLoad];
    [self initBanner];
}

- (void)initBanner {

    iAd = [[ADBannerView alloc] initWithFrame:CGRectZero];
    iAd.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
    [self.view addSubview:iAd];

    NSLog(@"iAd Loading...");
}

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {

    iAd.hidden = YES;

    NSLog(@"iAd Failed... Going With AdMob");

    GADBannerView *gAd = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
    gAd.adUnitID = @"Your ID";
    gAd.rootViewController = self;
    [self.view addSubview:gAd];
    [gAd loadRequest:[GADRequest request]];

}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM