capacitor-community / admob

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

Status "OBTAINED" not saved on Mac app after directly pressing "Approve" #311

Open mcoevert opened 4 months ago

mcoevert commented 4 months ago

Describe the bug When showing the consent form, directly pressing "Approve", the const { status } = await AdMob.showConsentForm(); returns OBTAINED. However, when calling await AdMob.requestConsentInfo() the status is REQUIRED. So it seems the status is not being saved.

However, if you first click the "Options" button, and then press "Approve", the status is being saved and there is no further issue.

All works fine on iOS and Android.

To Reproduce

  1. Create capacitor app + add the consent:
    const { status } = await AdMob.showConsentForm();
    const info = await AdMob.requestConsentInfo();
    console.log('Logging consent form status:', status, info.status);
  2. Run the app locally on your MacBook
  3. Press "Approve"
  4. Check the logs

Expected behavior I expect the status OBTAINED to be saved. And that, when requesting AdMob.requestConsentInfo(), I get OBTAINED as a status.

Screenshots Code: image

Consent form:

image

After pressing "Toestemming" (Approve): image

Desktop (please complete the following information):