NSAppTransportSecurity and @capacitor-community/admob

Hi All,

I’m migrating to Capacitor from Cordova but have hit an issue with the @capacitor-community/admob plugin that is mentioned in the docs here https://capacitorjs.com/docs/guides/ads. I could get Ads to show in the simulator on iOS, but on the actual device nothing would show if the iOS preference Limit Ad Tracking was turned on. A post on Stack Overflow suggested adding the following to NSAppTransportSecurity:

NSAllowsArbitraryLoadsInWebContent <true>
NSAllowsArbitraryLoadsForMedia <true>

And that makes the Ads show, but then the Apple docs here https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity/nsallowsarbitraryloads make it clear that’s (a) not a good idea, and (b) Apps may face rejection if the justification isn’t good enough.

As I understand it, AdMob should be loading over https anyway, so not entirely sure why adding those keys to NSAppTransportSecurity worked.

Has anyone else come across this issue? Possibly a bug I should raise in the Git, or am I missing something?