0

我正在创建一个主要使用 iAd 的 iOS 应用程序,但由于它们的填充率如此之低,我想添加另一个收入来源以在 iAd 不加载时使用。我决定使用 RevMob,因为我已经将它们用于我的另一个应用程序并且它们非常好。

当我运行该应用程序时,这是我得到的:

2014-02-11 18:53:50.364 Colors[5629:60b] [RevMob] Starting RevMobAds
2014-02-11 18:53:50.694 Colors[5629:60b] [RevMob] Initializating Banner.
2014-02-11 18:53:50.695 Colors[5629:60b] [RevMob] Requesting banner data.
2014-02-11 18:53:51.176 Colors[5629:60b] [RevMob] Device requirements not met (422).
2014-02-11 18:53:51.177 Colors[5629:60b] [RevMob] Error on banner: The operation couldn’t be completed. (Device requirements not met (422). error -1.)
2014-02-11 18:53:51.179 Colors[5629:60b] Ad error: Error Domain=Device requirements not met (422). Code=-1 "The operation couldn’t be completed. (Device requirements not met (422). error -1.)"
2014-02-11 18:53:51.209 Colors[5629:60b] [RevMob] App can't be registered in RevMob servers

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [RevMobAds startSessionWithAppID:@"*(I've tried deleting and re-adding the app in RevMob and getting a new id to no avail)"];
//    [RevMobAds session].parallaxMode = RevMobParallaxModeOff;
    return YES;
}

视图控制器.m:

-(void)bannerViewDidLoadAd:(ADBannerView *)banner {
    [UIView beginAnimations:nil context:nil];

    [UIView setAnimationDuration:1];

    [banner setAlpha:1];

    [UIView commitAnimations];

    [[RevMobAds session] hideBanner];
}

-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
    [UIView beginAnimations:nil context:nil];

    [UIView setAnimationDuration:1];

    [banner setAlpha:0];

    [UIView commitAnimations];

    [self loadRevMobAd];
}

-(void)loadRevMobAd {
    RevMobBannerView *banner = [[RevMobAds session] bannerView];
    banner.delegate = self;

    [banner loadWithSuccessHandler:^(RevMobBannerView *banner) {
        if (adBanner) {
            [banner setFrame:adBanner.frame];
            NSLog(@"Loaded adBanner");
        } else {
            [banner setFrame:iPadAdBanner.frame];
            NSLog(@"Loaded iPadAdBanner");
        }
        [self.view addSubview:banner];
        NSLog(@"Ad loaded");
    } andLoadFailHandler:^(RevMobBannerView *banner, NSError *error) {
        NSLog(@"Ad error: %@",error);
    } onClickHandler:^(RevMobBannerView *banner) {
        NSLog(@"Ad clicked");
    }];
}

我以前用过 RevMob,不记得遇到过这么多麻烦。当我在 Xcode 上运行这个应用程序时,我正在我的 iPhone 5s (7.0.4) 上构建它

4

1 回答 1

1

这是正确的,因为我现在也收到了这个问题。我刚刚将我的 revmob sdk 升级到最新版本,现在它无法在 ios 7 上运行,而 ios 6 运行良好。似乎问题来自最新的 revmob sdk,因为我昨天能够在旧的 sdks 上看到广告。

于 2014-02-12T07:44:14.697 回答