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
↧