unityAds won't show anymore after 3 ads

Hello,

I try to integrate UnityAds to an iOS game (Android is also planned). It works nice and I get the test advertising video. But after 3 ads I get the following message in the console and it won’t show anymore ads. I have to close/open the app to be able to get another 3 ads but again, it will stop after those 3 videos.

DEBUG [T:0xa32620 M] -[UnityAdsCampaignManager getViewableCampaigns]:256

I’m running unityAds is debug and test mode. Am I supposed to wait some delay to get another 3 ads or is there any ads limit in test mode?

Init unityAds

    viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
    viewController.wantsFullScreenLayout = YES;
    viewController.view = __glView;

#ifdef ADS
    [[UnityAds sharedInstance] setDelegate:self];
#ifdef DEBUG
    // TEST MODE: Do not use in production apps
    [[UnityAds sharedInstance] setTestMode:YES];
    [[UnityAds sharedInstance] setDebugMode:YES];
#endif
    [[UnityAds sharedInstance] startWithGameId:@"********" andViewController:viewController];
#endif
    // Set RootViewController to window
    if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0)
    {
        // warning: addSubView doesn't work on iOS6
        [window addSubview: viewController.view];
    }
    else
    {
        // use this method on ios6
        [window setRootViewController:viewController];
    }

Show the ads

if ([[UnityAds sharedInstance] canShow])
{
    return [[UnityAds sharedInstance] show];
}

I’m using cocos2dx 2.2.1 and iOS 5.1.

Thanks for your help

Sorry about the delayed response. I don’t normally check in with the Answers forum. We have a Unity Ads forum here.

Right away, two things stand out as issues:

  1. The method canShowAds is missing from your conditional statement. The method canShow checks to make sure the zone is ready, while canShowAds makes sure an ad is available and ready. You should be calling both.
  2. The latest version of Unity Ads requires iOS 6.0 or later.