Rewarded video does not show on IOS but works nice on Android (UNITY)

471 views
Skip to first unread message

tayre...@gmail.com

unread,
Jun 10, 2018, 8:05:36 PM6/10/18
to Google Mobile Ads SDK Developers
I also have Banner and interstitial ads in my game and these ads working proper on IOS and Android. There is no implementation issue on IOS as I'm using the same structure as Android. Here is some code...

RewardBasedVideoAd rewardBasedVideo;



 
public void Awake()
   
{
       
AdmobInstance = this;


#if UNITY_ANDROID
       
string appId = appIDAndroidProd;
#elif UNITY_IPHONE
           
string appId = appIDIOSProd;
#else
           
string appId = "unexpected_platform";
#endif
       
   
       
MobileAds.Initialize(appId);


        rewardBasedVideo
= RewardBasedVideoAd.Instance;
        rewardBasedVideo
.OnAdRewarded += HandleRewardBasedVideoRewarded;
        rewardBasedVideo
.OnAdClosed += HandleRewardBasedVideoClosed;
       
RequestRewardBasedVideo();


   
}


   
public void RequestRewardBasedVideo()
   
{
#if UNITY_ANDROID
       
string adUnitId = "XXXX";
#elif UNITY_IPHONE
       
string adUnitId = "XXXX";
#else
           
string adUnitId = "unexpected_platform";
#endif




       
AdRequest request = new AdRequest.Builder().Build();
        rewardBasedVideo
.LoadAd(request, adUnitId);


   
}


   
public bool ShowAdd()
   
{


       
if (rewardBasedVideo.IsLoaded())
       
{
            rewardBasedVideo
.Show();
           
return true;
       
}
       
else
       
{
           
RequestRewardBasedVideo();
           
return false;
       
}
   
}

When I call ShowAdd() function from another script, it works fine on Android. But does not work on IOS. What is the problem? I'm going crazy....

mobileadssdk-a...@google.com

unread,
Jun 11, 2018, 3:01:50 AM6/11/18
to tayre...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Thank you for providing your code snippets.

Please make sure that Limit Ad Tracking (Go to Settings > Privacy > Advertising) is turned off on your iOS device for your Rewarded Ads to load successfully.

You are indeed correct that if Rewarded Ads are displaying in your Android build, then it's safe to assume that the same Unity code implementation should work even if you build it for iOS. Also, looking at your code snippets, it should have worked as expected. However, though your code snippets doesn't really tell when the ShowAdd() method is called, I wouldn't really suggest that you call RequestRewardBasedVideo() if rewardBasedVideo.IsLoaded() = false when calling ShowAdd() method. Depending on when you are triggering the ShowAdd() method, you might call it during the time when the AdRequest is still being processed and haven't successfully returned an ad yet so you don't necessarily need to send a new AdRequest for this. I suggest that you refer to this guide on when it is a best time to send a new AdRequest for your Rewarded Video Ad.

That said, could you provide to us the following information privately (using Reply privately to author option) so we can have a closer look on this on our end?
  • Rewarded Ad Unit Id in question
  • Complete device logs particularly the error logs and error code captured when ads failed to load (using OnAdFailedToLoad
Regards,
Ivan Bautista
Mobile Ads SDK Team

çağatay bal

unread,
Aug 30, 2018, 9:52:00 AM8/30/18
to Google Mobile Ads SDK Developers
Hello there i have the same issue. Everything is just fine with android but not showing the ap on IOS. limit ad tracking is turned off but the issue is same... Plz give another possible solution.
TY.

mobileadssdk-a...@google.com

unread,
Aug 31, 2018, 6:48:17 AM8/31/18
to çağatay bal, Google Mobile Ads SDK Developers
Hi,

Thank you for reaching out to us.

There are a number of factors that could affect Ad serving on your end and one of these is the availability of ads for your Ad request. I'm assuming you are generating your Android and iOS builds via Unity as well. Given this, since your Android build is loading ads successfully, then we can safely assume that your code integration with the Google Mobile Ads Unity plugin is working correctly and the root cause might not be something specific to your code nor the SDK/plugin.

That said, for debugging purposes, could you test if you are able to load test ads using our sample Ad Unit Ids in your iOS build? However, seeing that this is an old thread, please create a new thread with your new findings and from there, we'll continue with the investigation.

Regards,
Ivan Bautista
Mobile Ads SDK Team


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/c90193ab-241e-471c-a9b2-f345f49c6a85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages