Wiki

Clone wiki

madvertise-gdpr-cmp-ios / cmp_third

Third-party Consent Manager

This documentation will go through all the steps required to used MAdvertiseCMP as third party consent ads without showing Popups.

Step 1: Import the MAdvertiseCMP SDK

First you will need to add the framework to you project:

Using Cocoapods:

The MAdvertiseCMP framework is available through Cocoapods. see Using CocoaPods section.

Manually :

download the latest version of MAdvertiseCMP framework, add it to your project and make sure it s included in 'Embedded binaries' in the general tab of your project configuration.

First you ll need to download and configure the consent settings file (plist), which serve to customise the appearance of the consent tool as well as filter the list of vendors by ID (by default all vendors are activated) :

Step 2: Initialize the MAdvertiseCMP SDK

The configure method takes the following parameters:

  • the App Id of your application.
  • the Consent Tool Configuration object.
  • the publisherCC value (corresponds to the country code (Two-letter) of the country in which the publisher's business entity is established like "FR", "DE", "IT"...).
        // Configure the CMPConsentManager shared instance.
         CMPLanguage *cmpLanguage = [[CMPLanguage alloc]initWithString:@"fr"];
         [CMPConsentManager.sharedInstance configure:@"MAdvertiseCMPSettingsTCFV2_config_fr" language:cmpLanguage appId:Your_APP_ID publisherCC:@"FR"];
         CMPConsentManager.sharedInstance.delegate = self;
     CMPConsentManager.shared.delegate = self

        // Configure the CMPConsentManager shared instance.
        let cmpLanguage = CMPLanguage(string: "fr") ?? CMPLanguage.DEFAULT_LANGUAGE
        CMPConsentManager.shared.configure("MAdvertiseCMPSettingsTCFV2_config_fr", language: cmpLanguage, appId: "APPid", publisherCC: "FR")      

You can generated IAB Transparency and Consent Framework (TCF V2) without Show MAdvertiseCMP Popups

  • To save the state of accepting you can use the method :

   [CMPConsentManager.sharedInstance acceptAllConsentTool];
   CMPConsentManager.shared.acceptAllConsentTool()
- To save the state of refusing you can use the method :

    [CMPConsentManager.sharedInstance refuseAllConsentTool];
    CMPConsentManager.shared.refuseAllConsentTool()

Advanced Topics

Note as well that some of the users might want to view (review) the publisher's privacy policy, and for that purpose we dedicated another callback method on CMPConsentManager.shared.delegate

    func consentManagerRequestsToPresentPrivacyPolicy(){
     print("present your privacy policy view")
     }

Updated