capacitor-community / admob

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

trackingAuthorizationStatus() returns incorrect value #288

Open nhuethmayr opened 9 months ago

nhuethmayr commented 9 months ago

Describe the bug Calling trackingAuthorizationStatus() returns authorized even when tracking is disabled on my iPhone entirely

To Reproduce

  1. Open Privacy & Security
  2. Click on Tracking
  3. Disable Allow Apps to Request to Track
  4. Open your app and make sure to request tracking permission
  5. The dialog does not show, yet the method returns authorized

Expected behavior Globally disabling the ability to ask for permission to track should result in trackingAuthorizationStatus() returning denied (or any other status that is different than authorized)

Screenshots IMG_8057

Smartphone:

rdlabo commented 8 months ago

What this plugin is doing is simple and probably caused by AdMob's libraries.

https://github.com/capacitor-community/admob/blob/master/ios/Plugin/Plugin.swift#L157-L173

We have just released v5.2.0 with the latest library update, so please check if it still occurs.

Thanks.

rdlabo commented 8 months ago

I updated readme example: https://github.com/capacitor-community/admob#initialize-admob

Please try by use v5.3.0

juanmaldonadodev commented 7 months ago

Hi @rdlabo For me readme is a bit confusing. Because based on this: https://github.com/capacitor-community/admob/issues/280

Here is explained that showConsentForm launch the tracking transparency request if we have implemented in Admob IDF Explainer: https://support.google.com/admob/answer/10115027

Also in the documentation method says: request requestTrackingAuthorization (iOS >14). This is deprecated method. We recommend UMP Consent.

So based on Apple rejecting apps because tracking transparency request is required.

I would say that the initialize explanation on the README is deprecated because is using requestTrackingAuthorization And it should warns that for use the plugin in iOS it is required to implement the IDF Explainer.

Is this correct?

sksk008 commented 2 months ago

what is the process ??

  1. admob initialise()
  2. ump (requestConsentInfo) and then
  3. trackingAuthorizationStatus()

or

  1. admob initialise()
  2. trackingAuthorizationStatus() and then
  3. ump (requestConsentInfo)

or just according to google.

  1. admob initialise()
  2. ump (requestConsentInfo)