iOS CMP - How to use your Own CMP
We do not recommend using your own CMP since we already provide good options that comply with the most common consent and user privacy laws around the world and also use the common standards that are require to optimize the Monetization. And also we are offering to manage it for you so you avoid complications in implementation and customization
Before moving on with this feature, remember that you can request cosmetic & technical changes to your assigned R89 CMP by contacting your technical account manager or you account manager.
Use the disable CMP method
R89SDK.shared.disableCMP()
Use
R89SDK.shared.initialize()
just after the user interaction of your CMP ends.
A CMP user interaction ends when the user accepts consent, rejects consent, saves custom consent settings, consent fails to show or resolve consent, you could identify this happening because the Consent Screen/layer closes/dismisses, you need to have an event/callback that tells you this has just happened and inside that callback call the initialize method. Make sure you call the initialize method in the UI Thread.
How to know if everything is correct
To tell If you did everything correctly you should use the R89SDK.shared.setLogLevel(level: LogLevels.debug)
to see this logs in this order in the console.
CMP is disabled → Means R89 CMP is not going to show.
CMP was used previous to initializing the R89 Monetization → we detected a CMP compatible with TCF 2.0 is being used.
CMP data is up to date → consent is updated with in the regulatory year.
If you don’t see this logs you are probably seeing this one of these:
“CMP data is outdated, you should call the CMP Again” → which means that you have very old consent, consent choices should be provided to the user every year and a industry standard is every 6 months, or you didn’t wait for the CMP to finish
“No CMP was used previous to initializing the R89 Monetization, it should” → which means that you are not using a TCF2.0 compatible CMP or you didn’t wait for the CMP to finish