Consent for Edge Network
The Adobe Experience Platform Consent mobile extension enables consent preferences collection from your mobile app when using the Adobe Experience Platform Mobile SDK and the Edge Network extension.

Configure the Adobe Experience Platform Consent extension in Data Collection UI

  1. 1.
    In Data Collection UI, in your mobile property, select the Extensions tab.
  2. 2.
    On the Catalog tab, locate or search for the Consent extension, and select Install.
  3. 3.
    Set your desired default consent level.
  4. 4.
    Select Save.
  5. 5.
    Follow the publishing process to update SDK configuration.
AEP Consent extension configuration
In order to ingest and use the data collected by this extension, follow the guide on ingesting data using the Consents and Preferences data type.

Add the AEP Consent extension to your app

Android
iOS (AEP 3.x)
iOS (ACP 2.x)

Java

  1. 1.
    Add the Mobile Core and Edge extensions to your project using the app's Gradle file.
    implementation 'com.adobe.marketing.mobile:core:1.+'
    implementation 'com.adobe.marketing.mobile:edge:1.+'
    implementation 'com.adobe.marketing.mobile:edgeidentity:1.+'
    implementation 'com.adobe.marketing.mobile:edgeconsent:1.+'
  2. 2.
    Import the Mobile Core and Edge extensions in your Application class.
    import com.adobe.marketing.mobile.MobileCore;
    import com.adobe.marketing.mobile.Edge;
    import com.adobe.marketing.mobile.edge.identity.Identity;
    import com.adobe.marketing.mobile.edge.consent.Consent;
  1. 1.
    Add the Mobile Core and Edge extensions to your project using Cocoapods. Add following pods in your Podfile:
    use_frameworks!
    target 'YourTargetApp' do
    pod 'AEPCore'
    pod 'AEPEdge'
    pod 'AEPEdgeIdentity'
    pod 'AEPEdgeConsent'
    end
  2. 2.
    Import the Mobile Core and Edge libraries:

Swift

// AppDelegate.swift
import AEPCore
import AEPEdge
import AEPEdgeIdentity
import AEPEdgeConsent

Objective-C

// AppDelegate.h
@import AEPCore;
@import AEPEdge;
@import AEPEdgeIdentity;
@import AEPEdgeConsent;
This extension is built on the AEPCore (3.x) and it is not compatible with ACPCore (2.x). Please follow the guide for migrating to the Swift AEPCore.

Register Edge extensions with Mobile Core

Android
iOS AEP(3.x)

Java

public class MobileApp extends Application {
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
try {
Edge.registerExtension();
Consent.registerExtension(); // register Consent
Identity.registerExtension();
// register other extensions
MobileCore.start(new AdobeCallback() {
@Override
public void call(final Object o) {
MobileCore.configureWithAppID("yourAppId");
}});
} catch (Exception e) {
//Log the exception
}
}
}

Swift

// AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MobileCore.registerExtensions([Identity.self, Edge.self, Consent.self], {
MobileCore.configureWith(appId: "yourLaunchEnvironmentID")
})
...
}

Objective-C

// AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[AEPMobileCore registerExtensions:@[AEPMobileEdgeIdentity.class, AEPMobileEdge.class, AEPMobileEdgeConsent.class] completion:^{
[AEPMobileCore configureWithAppId: @"yourLaunchEnvironmentID"];
}];
...
}

Configuration keys

To update the SDK configuration programmatically, use the following information to change the Edge Consent configuration values.
Key
Required
Description
Data Type
consent.default
No
Consents in XDM format. For more details, see Privacy/Personalization/Marketing Preferences (Consents) Schema.
Map