- Home /
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
Answer by unity-nikkolai · Jan 26, 2015 at 07:17 PM
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:
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.
The latest version of Unity Ads requires iOS 6.0 or later.
I have the same issue. I'm essentially using the sample code that comes with the unityAds package to show an ad and to show a reward ad.
Works fine in Android dev environment (playing on PC in Unity Editor, ads always show).
Works fine on Android device (ads always show).
Works fine in iOS dev environment (playing on $$anonymous$$ac in Unity Editor, ads always show).
does not work on iOS device (ads show 3 times, regardless if interstitial or reward or both, then stop showing).
I've tried testing with debug$$anonymous$$ode true and false. I was about to submit my final build but this is stopping me now. I'm not sure if it's expected behavior and won't act like this when it's distributed live??
Your answer
![](https://koobas.hobune.stream/wayback/20220613165009im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity Ads Advertising Identifier (iOS) 1 Answer
Ads video not paused when multitasking on iOS 0 Answers
what would happen if you archived a published unity project? 1 Answer
(Unity Ads) ShowResult.Failed not triggered without internet at initialization 0 Answers
Unity Pro 4.6.8 MAC OSX El Capitan Last version of XCODE and Facebook SDK 0 Answers