iOS native ads failed to load when AppBoundDomains turn on

957 views
Skip to first unread message

Dr. DS

unread,
Jul 20, 2021, 2:47:32 AM7/20/21
to Google Mobile Ads SDK Developers
In iOS 14, admob ads do not load at all when WKAppBoundDomains key is set in info.plist.

I have also tried by adding, googleads.g.doubleclick.net , googleads.g.doubleclick-cn.net in the list of WKAppBoundDomains but it doesn't works.

In background, admob creates a webview to load ads, but when WKAppBoundDomains is set in info.plist , script injection by admob fails with message "Ignoring user script injection for non-app bound domain." in webview console.

admob must configure its webview with following in order to load ad, and provide the list of domains for user to add in its WKAppBoundDomains.

let config = WKWebViewConfiguration()
        config.userContentController = contentController
        if #available(iOS 14.0, *) {
            config.limitsNavigationsToAppBoundDomains = true
        }

Please check and provide a workaround.

Regards,


Mobile Ads SDK Forum Advisor

unread,
Jul 20, 2021, 1:00:40 PM7/20/21
to divyes...@gmail.com, google-adm...@googlegroups.com
Hi Dr. DS,

Thank you for reaching out to us regarding this question. To be able to further look into this we will be needing to get a simple sample that uses the WKAppBoundDomains. You can share this via the "Reply to Author" button. Also just as a side note to this, I see that there is a limit of 10 domains with regard to this function. So we would also suggest making sure you are not exceeding this limit.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2JC6Sq:ref

Dr. DS

unread,
Jul 21, 2021, 12:50:42 PM7/21/21
to Google Mobile Ads SDK Developers
Hi,

I have already sent you the code through "Reply to Author" option.
I have checked with other ad types and this pertains to admob ads in general (including reported native ads).

In iOS14+ apps can opt to use WKAppBoundDomains in its WKwebview, it will empower them to use additional restricted APIs such as "service worker" on listed WKAppBoundDomains domains. On the other side, it will also restrict them to run scripts on all other domains other than listed in WKAppBoundDomains.

Admob employs webview in background to load ads and if apps are using WKAppBoundDomains in any of its webview, then ad loading will failed as it blocks admob content srcipts to run in its hidden webview.

A possible solution could be providing an option to set limitsNavigationsToAppBoundDomains = true  in admob's webview config and provide a list of domains (not more than 1-2, as the limit is 10) to developers to include in WKAppBoundDomains.

Please check and provide a solution.

Thank you.

Mobile Ads SDK Forum Advisor

unread,
Jul 22, 2021, 10:48:46 AM7/22/21
to divyes...@gmail.com, google-adm...@googlegroups.com
Hi Dr. DS,

We will bring this feedback back to the engineering team to see how they might support this feature, or if they've thought about it already. On first look from my end though, I'm not sure how compatible this feature is for ads, and don't see it as being just as easy as setting the flag. googleads.g.doubleclick.net is where most of the ads are loaded, but once the ad content is put into a WebView, the ads themselves will then try to load assets from other places, which could come from anywhere depending on the creative. That won't fit nicely into just a couple of domains.

Thanks,
Eric, Mobile Ads SDK Team

ref:_00D1U1174p._5004Q2JC6Sq:ref

Dr. DS

unread,
Jul 24, 2021, 1:59:28 AM7/24/21
to Google Mobile Ads SDK Developers
Hi,

I have checked, loading assets from other domains are not impacted by setting this flag (until it is not a redirect or navigation to another domain). By setting this flag, cross domain script injection is not possible except domains listed in WKAppBoundDomains .
Because of this issue, I am unable to use Admob in my iOS app.

Can you provide a expected time for resolution ?

Mobile Ads SDK Forum Advisor

unread,
Jul 26, 2021, 7:18:08 PM7/26/21
to divyes...@gmail.com, google-adm...@googlegroups.com
Hello,

After consulting with the team internally, I've confirmed my initial suspicions that it isn't feasible to support this feature. The ads themselves may hit any domain, so there's not 10 specific domains we could put in an allowlist.

Dr. DS

unread,
Jul 27, 2021, 7:39:37 AM7/27/21
to Google Mobile Ads SDK Developers
Hi,

Thanks for letting me know.
I understand its a big task to support this feature, as currently AdMob requires a hidden webview to load ads all of its ad units.
Anyways, I have checked with other ad networks and found specifically "native banner ad" of facebook audience network doesn't load its ad via webview instead it calls an api to load ads, hence it is working in my implementation.

I really think, admob should start working in this area as soon as possible,  as AppBoundDomains is new to iOS 14 and in future many iOS developers may be using it. They all will have no other option to monetize their apps using admob and have to drop it completely.

I also request you to update admob docs reflecting "admob ads will not work with iOS apps using AppBoundDomains"

Thanks

Mobile Ads SDK Forum Advisor

unread,
Jul 27, 2021, 10:41:52 AM7/27/21
to divyes...@gmail.com, google-adm...@googlegroups.com

Hello,

Thanks for the feedback, agree with documenting the limitation in some capacity and will bring that up with the team to address.

Re: supporting the app bounds feature itself, it's something we'll continue to watch to see how it evolves and how the ads industry reacts to it.



Thanks,
Eric, Mobile Ads SDK Team



ref:_00D1U1174p._5004Q2JC6Sq:ref
Message has been deleted

محمد خضر الحميدي

unread,
Jun 3, 2025, 2:16:34 AM6/3/25
to Eric Slosser, Google Mobile Ads SDK Developers

What is your full name?


في الثلاثاء، ٣ يونيو ٢٠٢٥, ١٢:٣٠ ص 'Eric Slosser' via Google Mobile Ads SDK Developers <google-adm...@googlegroups.com> كتب:
What's the current status of this? We'd like to use App Bound Domains in our app, but are finding that native (GMA-SDK) and web (GPT) ads are failing to load.
--

---
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-admob-ads-sdk/f95569ad-9107-4d66-8879-bb8ab4ee13a9n%40googlegroups.com.

Mobile Ads SDK Forum Advisor

unread,
Jun 3, 2025, 6:42:53 AM6/3/25
to mohammad...@gmail.com, eric.s...@nytimes.com, google-adm...@googlegroups.com

Hi Eric,

Thank you for contacting the Mobile Ads SDK Support team.

As we mentioned earlier, it isn't feasible to support this feature. Ads can hit huge numbers of domains, so it won't be able to specify all domains in the Plist.

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-03 10:41:59Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02JC6Sq:ref" (ADR-00073250)



Reply all
Reply to author
Forward
0 new messages