Interstitial OnAdClosed event not firing for iOS on Unity when "Optimize Initialization" / "Optimize ad loading" enabled
See original GitHub issue[REQUIRED] Step 1: Describe your environment
- Unity version: 2021.3.12f1
- Google Mobile Ads Unity plugin version: 1.2.172 / 1.2.174
- Platform: iOS
- Platform OS version: All iOS Versions
- Any specific devices issue occurs on: iPhone 6s
- Mediation ad networks used, and their versions: N/A
[REQUIRED] Step 2: Describe the problem
When enabling “Optimize Initialization” and “Optimize ad loading” from the “Google Mobile Ads Settings” inspector panel, OnAdClosed
is not fired after an interstitial ad is closed.
Note that OnAdClosed
fires successfully for Android.
Initially I thought it might be an issue with OnAdClosed
not being fired on the main (UI) thread, but after closer inspection it appears to not fire at all.
Note that you can get to the “Google Mobile Ads Settings” scene by going to “Assets” / “Google Mobile Ads” / “Settings”, then opening the “Inspector” tab.
Steps to reproduce:
- Create a new project.
- Select “Optimize Initialization” and “Optimize ad loading” on admob
- Create a interstitial that fires, and setup a callback to
OnAdClosed
- Notice that it does not fire on iOS (does fire on Android)
Relevant Code:
_interstitialAd = new InterstitialAd("-----AD_ID------");
_interstitialAd.OnAdClosed += HandleRewardedInterstitialClosed;
_interstitialAd.LoadAd(createAdRequest());
_interstitialAd.Show();
private void HandleRewardedInterstitialClosed(object sender, EventArgs args)
{
Logger.log("Called")
}
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Interstitial ads not working on Android devices with Unity ...
Interstitial ads work perfectly on iOS devices, so the code isn't an issue. This is my initialization code: Code (CSharp):. void Awake() ...
Read more >Interstitial ads | Unity
This guide explains how to integrate interstitial ads into a Unity app. ... Before loading ads, have your app initialize the Mobile Ads...
Read more >Optimize initialization and ad loading (Beta) | Unity
This guide outlines the changes you need to make to enable these optimizations. Requirements. Complete the Get Started guide. Google Mobile Ads ......
Read more >Interstitial Integration for Unity Plugin
The ironSource Unity Plugin fires several events to inform you of ad availability. ... function is fired, you will be able to load...
Read more >Google AdMob ads were working in Unity - now they're not
I am working on an iOS app with Unity 2019.2.21f1. ... string appId = "unexpected_platform"; #endif // Initialize the Google Mobile Ads SDK....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unclear why
AndroidManifest.xml
is relevant since this is an iOS issue? Issue does not appear on Android.@NVentimiglia was this ever resolved?