[iOS][BUG] Events are not working when app is in background state

187 views
Skip to first unread message

Arsal Imam

unread,
Mar 30, 2023, 8:00:11 PM3/30/23
to Interactive Media Ads SDK
Hello IMA SDK community,

We have an audio streaming application for iOS in which we're using IMA SDK to stream audio ads to the users. We got multiple complaints from our community that the content automatically stops playing after the ad is completed if the application is in the background state.

During our analysis, we identified that IMAAdsManagerDelegate is not sending events if the application is in the background. We also checked IMA's support forum and discovered that a fix was added earlier to the IMA SDK release v3.14.4. Still, that fix is also not working if the VAST file contains two back-to-back pre-roll ads and events are not triggering by the IMA SDK's delegate if the application is in the background state.

We are also able to reproduce this issue in the latest version (v3.18.4) of IMA SDK with provided sample apps (AdvancedExample). 

Regards,

Arsal Imam

unread,
Mar 30, 2023, 8:22:11 PM3/30/23
to Interactive Media Ads SDK

Please check the attached video (with logs) to validate the behavior of the issue in the sample app,

Video URL: https://drive.google.com/file/d/1K79EPHEayfnUEcHd9EFj3-QEum58XpHK/view?usp=sharing

Logs:
2023-03-31 03:29:57.836405+0500 AdvancedExample[77039:1247887] Requesting ads
2023-03-31 03:29:59.576670+0500 AdvancedExample[77039:1247887] AdsManager event Loaded
2023-03-31 03:30:00.915100+0500 AdvancedExample[77039:1247887] AdsManager event Started
2023-03-31 03:30:05.765147+0500 AdvancedExample[77039:1247887] AdsManager event First Quartile
2023-03-31 03:30:10.170146+0500 AdvancedExample[77039:1247887] AdsManager event Midpoint
2023-03-31 03:30:14.689233+0500 AdvancedExample[77039:1247887] AdsManager event Third Quartile
2023-03-31 03:30:19.099863+0500 AdvancedExample[77039:1247887] AdsManager event Complete
2023-03-31 03:30:19.135142+0500 AdvancedExample[77039:1247887] AdsManager event Loaded
2023-03-31 03:30:23.902986+0500 AdvancedExample[77039:1247887] AdsManager event Started
2023-03-31 03:30:24.788910+0500 AdvancedExample[77039:1247887] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

Environment:
XCode: 14.2 (14C18)
Swift: 5
IMA SDK: v3.18.4

The VAST file should contain more than one ad.

IMA SDK

unread,
Mar 31, 2023, 6:13:14 AM3/31/23
to arsal...@noice.id, ima...@googlegroups.com

Hi Arsal,

Thank you for raising your concern to my team.

I was not able to reproduce the issue on my end using our AdvancedExample(Swift). For us to further investigate kindly provide the following information privately:

  • Vast Ad tag
  • A copy of your application where the issue is reproducible
  • Steps to reproduce the issue

You can send these details via the "Reply to Author" option. If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to
https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002kDhjnQAC&entry.80707362=00173008
2. Fill out all fields, and attach your file(s).
3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Looking forward to your response.

Regards,

Google Logo IMA SDK Team


ref:_00D1U1174p._5004Q2kDhjn:ref

Arsal Imam

unread,
Apr 4, 2023, 5:20:04 PM4/4/23
to Interactive Media Ads SDK
Hi IMA,

I have posted the requested information using the "Reply to Author" option, please review it and let me know if you are needed more information from my side.

Thanks,
Arsal Imam

IMA SDK

unread,
Apr 5, 2023, 3:26:32 AM4/5/23
to arsal...@noice.id, ima...@googlegroups.com

Hi Arsal,

Thank you for providing the requested information.

Upon testing using your provided ad tag, I was able to reproduce the issue you reported. With that said, for further investigation on this, allow me to raise your concern with the rest of the team. Rest assured we'll keep you posted on any updates regarding your concern.

Best Regards,

Arsal Imam

unread,
Apr 5, 2023, 5:24:08 PM4/5/23
to Interactive Media Ads SDK

Hi IMA,

Thanks for confirming the issue. 

Please keep us posted on this issue and also please share any temporary workaround that we can use to minimize its occurrence rate (if possible) as we're getting multiple complaints from the users around this issue.

Regards,
Arsal Imam

IMA SDK

unread,
Apr 10, 2023, 1:23:43 AM4/10/23
to arsal...@noice.id, ima...@googlegroups.com

Hi Arsal,

We will update you on this thread as soon as we have information to share.

Regards,

Arsal Imam

unread,
Apr 18, 2023, 9:37:00 AM4/18/23
to Interactive Media Ads SDK
Hi IMA,

Any update on this thread, we're constantly getting bad reviews from our users (~1 bad review/day). Can we expedite this issue or allow us to help with the code?

Regards,
Arsal Imam

IMA SDK

unread,
Apr 18, 2023, 10:04:29 AM4/18/23
to arsal...@noice.id, ima...@googlegroups.com

Hi Arsal,

 

Unfortunately, we have no updates as of the moment. Rest assured that we will reply to you on this thread as soon as we have information to share. Thank you for your patience.

Arsal Imam

unread,
May 30, 2023, 3:37:08 AM5/30/23
to Interactive Media Ads SDK
Hi IMA,

Any update on this thread, we're constantly getting bad reviews from our users (~1 bad review/day). Can we expedite this issue or allow us to help with the code?

Regards,
Arsal Imam

Charles MacDuff

unread,
May 30, 2023, 9:22:11 PM5/30/23
to Interactive Media Ads SDK
I have the exact same problem using the IMA SDK AdvancedExample (with version 3.19.1 of the GoogleAds-IMA-iOS-SDK), events are sent late when the application is in background. 

"Loaded" and "Ad Break Ready" events are sent correctly at the expected time, but subsequent events 
  • Started

  • First Quartile

  • Midpoint

  • Third Quartile

  • Complete

are delayed by several seconds. This causes the playback to freeze at the end of an ad because the SDK waits for the "Complete" event to be received before automatically moving on to the next ad in the ad break.

If I only had one ad in my adBreak I could have called the `adsManager.discardAdBreak()` function when the adDidProgressToTime is equal to the totalTime, but with my situation it will cause the second ads in the ad break to be lost.

Another thing to mention is that if I go back in foreground while the events are "frozen", I'll receive all the events I should have received earlier at the same time.

Charles

IMA SDK

unread,
Jun 1, 2023, 5:24:26 PM6/1/23
to charlesma...@gmail.com, ima...@googlegroups.com

Hi,

@Arsal,
The issue is still under investigation, however, allow me to follow-up on this. We'll keep you posted on any updates regarding this.

@Charles,
To further check your issue, can you provide the following details below:

  • copy of the modified AdvancedExample where issue is reproducible
  • Screen recording showing the issue
  • Steps to reproduce the issue

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002kDhjnQAC&entry.80707362=00173008

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

 
This message is in relation to case "ref:_00D1U1174p._5004Q2kDhjn:ref"

Thanks,

 
Google Logo IMA SDK Team


Arsal Imam

unread,
Jun 26, 2023, 11:14:18 AM6/26/23
to Interactive Media Ads SDK
Hello IMA SDK team,

Its been months and we're still facing the same issue, our ratings and revenue are dropping dramatically. Request to please consider this issue on priority or let us know if we can contribute somewhere to park this issue,

Thanks,
Arsal Imam

IMA SDK

unread,
Jun 27, 2023, 3:20:58 AM6/27/23
to arsal...@noice.id, ima...@googlegroups.com

Hi Arsal,

Thank you for your patience, we are still investigating your concern. However, allow me to follow up on this and we will provide you with an update as soon as we receive any information.
 

IMA SDK

unread,
Jan 3, 2024, 2:30:14 PMJan 3
to ima...@googlegroups.com, arsal...@noice.id
Hi Arsal,

Backgrounding behavior is not guaranteed and some functions (javascript execution, for example) of the app may be slowed or suspended while it is in the background.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02kDhjn:ref"


Thanks,
 
Google Logo IMA SDK Team


Reply all
Reply to author
Forward
0 new messages