capacitor-community / admob

Community plugin for using Google AdMob
MIT License
205 stars 66 forks source link

No ViewController error when calling AdMob.showConsentForm() #291

Closed ecc521 closed 8 months ago

ecc521 commented 8 months ago

The error is coming from line 66 on ConsentExecutor.swift

https://github.com/capacitor-community/admob/blob/aeb4e17ab7a28f29a6c9f1f4a70494c0d6bf44cd/ios/Plugin/Consent/ConsentExecutor.swift#L66

Really weird issue - thoughts on what could be causing it?

I would mention that this is occurring when testing using DebugGeography and the test device identifier from a non-EU region.

distante commented 8 months ago

You have to check that the form is available before calling it. (also be sure to initialize the plugin first)