For the next version of MBS Xojo Plugins we include an update for Google Admob to the version 10.14 of the SDK. With the update, we get new classes to show a consent form to ask user whether he likes to get tracked for advertisement. To quote Google's documentation:
We got these four new classes:
Now you may do the following steps:
- You call requestConsentInfoUpdateWithParameters on UMPConsentInformationMBS to check the state.
- If consentStatus property is ConsentStatusObtained or ConsentStatusNotRequired, you can start showing ads and skip the next two steps.
- When you get the callback, you use UMPConsentFormMBS class with loadAndPresentIfRequiredFromViewController to show the dialog.
- You get another callback and then you can check status. If no error happened, the user allowed it.
- You check canRequestAds property and if true, you can start loading ads.
For more details, check the original documentation from google, e.g. UMP SDK.
You may need to quickly implement this early in 2024 to comply with requirements from Google's play store:
In case you missed it, we announced new consent management platform requirements for serving ads in the EEA and UK. Beginning January 16, 2024, Google will require all publishers to use a Google-certified consent management platform (CMP) when serving ads to users in the European Economic Area or the UK.
Please try the new classes, add them to your iOS apps if you do advertisments and let us know how they work.