Delay in Event Reporting When iOS App Moves to Background During Ad Playback

164 views
Skip to first unread message

Dmytro Pokoptsev

unread,
Jun 9, 2024, 8:11:14 PM 6/9/24
to Interactive Media Ads SDK
Hi

We are encountering an issue with the Google Interactive Media Ads SDK for iOS in our app. With the latest version of the SDK (3.22.1), when the app is moved to the background during ad playback, the 1st ad continues to play as expected, and related events (such as first quartile, second quartile, etc.) are reported correctly. However, issues arise with the subsequent ad. While the 2nd ad starts and plays correctly, there is a significant delay in event reporting.

Additionally, we get an error "AdError 402: VAST media file loading reached a timeout of 20 seconds"

Please note these issues do not occur in SDK version 3.8.2

IMA SDK

unread,
Jun 10, 2024, 4:48:42 AM 6/10/24
to d.pok...@gmail.com, ima...@googlegroups.com

Hi,

Thank you for contacting the IMA SDK support team.

Please note that we ran a Google Advanced sample application with the version you have mentioned and we did not find any issues. Could you please confirm whether you are facing the same issue in Google Advanced sample application ?

If you are using any breakpoints kindly remove the breakpoints and run the application and also share the video recording with us so that we can conduct an investigation.

This message is in relation to case "ref:!00D1U01174p.!5004Q02tJGOs:ref" (ADR-00239221)

Thanks,
Google Logo
IMA SDK Team



IMA SDK

unread,
Jun 10, 2024, 11:30:35 AM 6/10/24
to d.pok...@gmail.com, ima...@googlegroups.com
Hi,

Thanks for sharing video recording.
I am checking your issue and get back to you shortly.

Dmytro Pokoptsev

unread,
Jun 10, 2024, 11:42:12 AM 6/10/24
to Interactive Media Ads SDK
Hi

I was able to reproduce it with slightly tweaked Advanced example. Please find the app , the video and the logs in the attachments.

My changes:

1) Resuming playback on entering background
2) In our app we control the number of ads per block so we form a VAST document and feed it to your SDK. So in the AudioAds folder I added necessary files for VAST creation and parsing together with AEXML library in the pods
3) Rewrote func requestAdsWithTag(_ adTagUrl: String!) so that it implements the above mentioned case

In the video you can see that the second ad ends at 12:20:46 but the first quartile event is reported with delay at 12:21:17

Steps to reproduce with the tweaked Advanced Example:

1) Run the app and select any video
2) Wait for the ads to start and move the app to background
3) Observe when the 2nd ad finishes playback, the app becomes silent.
4) When returning back to the app observe the VAST timeout error

Please note, in foreground it works fine




AdvancedExample.zip
logs.txt

IMA SDK

unread,
Jun 10, 2024, 2:51:54 PM 6/10/24
to d.pok...@gmail.com, ima...@googlegroups.com

Hi,

Thank you for providing the steps to reproduce and bringing this issue to our attention.

Yes, the issue is reproducible in Version 3.22.1, the issue occurs only in the background state but not in the foreground. With that said, I will share this issue with a wider team and one of my team members will reach out to you once we have an update. In the meantime, I kindly request your patience. 

N. Gomez

unread,
Jun 23, 2024, 6:44:39 AM 6/23/24
to Interactive Media Ads SDK
Hi,

I'm facing the same issue in an audio app.

Also tried AdvancedExample and happens this behavior without modified anything (tested in device with iOS 14.2).

Steps to reproduce:
- Run AdvancedExample
- Play "VAMP Pods" example
- Move app to background
- Wait for midroll and see log in xcode

N. Gomez

unread,
Jun 23, 2024, 6:52:34 AM 6/23/24
to Interactive Media Ads SDK
Note: "adsManager(_:adDidProgressToTime:totalTime:)" delegate works perfectly in background, every time I guess.

IMA SDK

unread,
Jun 24, 2024, 10:58:26 AM 6/24/24
to naza...@digio.es, ima...@googlegroups.com
Hi,

Team is looking into this issue. And i will get back once i got any update, meanwhile your patience is important.
Thanks

Andrew Simpson

unread,
Jul 4, 2024, 4:52:00 PM 7/4/24
to Interactive Media Ads SDK
Any updates on this? It would be great to get this fixed!

IMA SDK

unread,
Jul 4, 2024, 5:00:55 PM 7/4/24
to andrew.p...@gmail.com, ima...@googlegroups.com

N. Gomez

unread,
Aug 1, 2025, 5:49:36 AM Aug 1
to Interactive Media Ads SDK
Hi,

Long time since last update, any news?

Thanks!

IMA SDK

unread,
Aug 1, 2025, 12:13:29 PM Aug 1
to naza...@digio.es, ima...@googlegroups.com

Hi,
The investigation is still ongoing. I will get back to you as soon as I receive any updates from the wider team, meanwhile could you please confirm whether you're experiencing this issue with the latest version 32.6.1

Thanks,
Google Logo
IMA SDK Team

Feedback
How was our support today?

rating1 rating2 rating3 rating4 rating5
[2025-08-01 16:13:20Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02tJGOs:ref" (ADR-00239221)



N. Gomez

unread,
Aug 8, 2025, 7:45:56 AM Aug 8
to Interactive Media Ads SDK
Hi!

I've been testing some days, and seems its fixed, at least partially.

One question, is mandatory to requests ads that adContainer is a subview on top of view hierarchy? Is not enough to be part of view hierarchy?

Maybe, think about schedule in developers roadmap a way to play ads without associated views (audio-only apps) like in Android.

Thanks!

IMA SDK

unread,
Aug 8, 2025, 1:50:49 PM Aug 8
to naza...@digio.es, ima...@googlegroups.com

Hi,

Yes, it is mandatory for the adContainer to be a subview of the main window, positioned at the top of the view hierarchy, and visibly displayed. Just being a part of the view hierarchy is not enough because that the SDK expects the adContainer to be able to render the video ad content. 


Thanks,
Google Logo
IMA SDK Team

Feedback
How was our support today?

rating1 rating2 rating3 rating4 rating5

[2025-08-08 17:50:38Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02tJGOs:ref" (ADR-00239221)



Reply all
Reply to author
Forward
0 new messages