Adobe Experience Platform Assurance extension
This document lists information about the previous versions of the Adobe Experience Platform Mobile SDKs. Check out this page for latest versions and solution support of the Mobile SDKs.
This extension enables capabilities for Adobe Experience Platform Assurance.
To get started with Assurance in your app, you'll need to:
- Install the AEP Assurance extension in the Data Collection UI
- Add AEP Assurance SDK extension library to your app
- Import AEP Assurance into your app
- Register and implement extension APIs
Install the AEP Assurance extension in the Data Collection UI
Go to the Experience Platform Data Collection UI and select your mobile property:
- In the Data Collection UI, select the Extensions tab.
- On the Catalog tab, locate the AEP Assurance extension, and select Install.
- Follow the publishing process to update the Mobile SDK configuration.
Add the AEP Assurance extension to your app
Import the library to your app code
- Add the following libraries in your project's
build.gradle
file:
Copied to your clipboardimplementation 'com.adobe.marketing.mobile:core:1+'implementation 'com.adobe.marketing.mobile:assurance:1+'
- Import the Assurance library along with the other Mobile SDK libraries:
Copied to your clipboardimport com.adobe.marketing.mobile.Assurance;import com.adobe.marketing.mobile.MobileCore;
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
Add the library to your project via your Cocoapods Podfile
:
Copied to your clipboardpod 'ACPCore'pod 'AEPAssurance','~> 1.0'
Import the Assurance extension along with the other Adobe Mobile extensions:
Swift
Copied to your clipboardimport ACPCoreimport AEPAssurance
Objective-C
Copied to your clipboard#import "ACPCore.h"#import "AEPAssurance.h"
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
- Install the AEP Assurance package.
Copied to your clipboardnpm install @adobe/react-native-aepassurance@2.0.1
- Link the module.
React Native 0.60+
CLI autolink feature links the module while building the app.
React Native <= 0.59
Copied to your clipboardreact-native link @adobe/react-native-aepassurance
Note For iOS
using cocoapods
, run:
Copied to your clipboardcd ios/ && pod install
- Import the extension.
Copied to your clipboardimport {AEPAssurance} from '@adobe/react-native-aepassurance';
- Get the extension version.
Copied to your clipboardAEPAssurance.extensionVersion().then(version => console.log("AdobeExperienceSDK: AEPAssurance version: " + version));
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
- Install the AEP Assurance package.
Installation instructions can be found in the Flutter documentation.
- Import the extension.
Copied to your clipboardimport 'package:flutter_assurance/flutter_assurance.dart';
- Get the extension version.
Copied to your clipboardString version = await FlutterAEPAssurance.extensionVersion;
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
- After creating your Cordova app and adding the Android and iOS platforms, the AEPAssurance extension for Cordova can be added with this command:
Copied to your clipboardcordova plugin add https://github.com/adobe/cordova-aepassurance.git
- Get the extension version.
Copied to your clipboardAEPAssurance.extensionVersion(function(version) {console.log("AEPAssurance version: " + version);}, function(error) {console.log(error);});
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
C#
- After importing the AEPAssurance.unitypackage, the AEP Assurance extension for Unity can be added with the following code in the MainScript:
Copied to your clipboardusing com.adobe.marketing.mobile;
- Get the extension version.
Copied to your clipboardAEPAssurance.extensionVersion();
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
C#
- After adding the iOS or Android AEP Assurance NuGet package, the Assurance extension can be added by this import statement:
Copied to your clipboardusing Com.Adobe.Marketing.Mobile;
- Get the extension version.
Copied to your clipboardAEPAssurance.ExtensionVersion();
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
- Add the following libraries in your project's
build.gradle
file:
Copied to your clipboardimplementation 'com.adobe.marketing.mobile:core:1+'implementation 'com.adobe.marketing.mobile:assurance:1+'
- Import the Assurance library along with the other Mobile SDK libraries:
Copied to your clipboardimport com.adobe.marketing.mobile.Assurance;import com.adobe.marketing.mobile.MobileCore;
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
Add the library to your project via your Cocoapods Podfile
:
Copied to your clipboardpod 'ACPCore'pod 'AEPAssurance','~> 1.0'
Import the Assurance extension along with the other Adobe Mobile extensions:
Swift
Copied to your clipboardimport ACPCoreimport AEPAssurance
Objective-C
Copied to your clipboard#import "ACPCore.h"#import "AEPAssurance.h"
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
- Install the AEP Assurance package.
Copied to your clipboardnpm install @adobe/react-native-aepassurance@2.0.1
- Link the module.
React Native 0.60+
CLI autolink feature links the module while building the app.
React Native <= 0.59
Copied to your clipboardreact-native link @adobe/react-native-aepassurance
Note For iOS
using cocoapods
, run:
Copied to your clipboardcd ios/ && pod install
- Import the extension.
Copied to your clipboardimport {AEPAssurance} from '@adobe/react-native-aepassurance';
- Get the extension version.
Copied to your clipboardAEPAssurance.extensionVersion().then(version => console.log("AdobeExperienceSDK: AEPAssurance version: " + version));
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
- Install the AEP Assurance package.
Installation instructions can be found in the Flutter documentation.
- Import the extension.
Copied to your clipboardimport 'package:flutter_assurance/flutter_assurance.dart';
- Get the extension version.
Copied to your clipboardString version = await FlutterAEPAssurance.extensionVersion;
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
- After creating your Cordova app and adding the Android and iOS platforms, the AEPAssurance extension for Cordova can be added with this command:
Copied to your clipboardcordova plugin add https://github.com/adobe/cordova-aepassurance.git
- Get the extension version.
Copied to your clipboardAEPAssurance.extensionVersion(function(version) {console.log("AEPAssurance version: " + version);}, function(error) {console.log(error);});
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
C#
- After importing the AEPAssurance.unitypackage, the AEP Assurance extension for Unity can be added with the following code in the MainScript:
Copied to your clipboardusing com.adobe.marketing.mobile;
- Get the extension version.
Copied to your clipboardAEPAssurance.extensionVersion();
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
C#
- After adding the iOS or Android AEP Assurance NuGet package, the Assurance extension can be added by this import statement:
Copied to your clipboardusing Com.Adobe.Marketing.Mobile;
- Get the extension version.
Copied to your clipboardAEPAssurance.ExtensionVersion();
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
Register AEPAssurance with Mobile Core
To start using the extension library, you must first register the extension with the Mobile Core extension.
Java
Register the extension when you register other extensions.
To find your app ID, which is mentioned below, please read the Mobile Install Instructions. Within the "Publishing Flow", select the small gray box next to the "Environment" dropdown.
Copied to your clipboardpublic class MobileApp extends Application {@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);try {// register other necessary extensionsAssurance.registerExtension();MobileCore.start(new AdobeCallback() {@Overridepublic void call(final Object o) {MobileCore.configureWithAppID("yourAppId");}});} catch (Exception e) {// Log the exception}}}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
When using React Native, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs.
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
Dart
When using Flutter, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs.
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
When using Cordova, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs.
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
C#
Register the extension in the start()
function:
Copied to your clipboardusing com.adobe.marketing.mobile;using using AOT;public class MainScript : MonoBehaviour{[MonoPInvokeCallback(typeof(AdobeStartCallback))]public static void HandleStartAdobeCallback(){// set app id from the Data Collection UIACPCore.ConfigureWithAppID("yourAppId");}// Start is called before the first frame updatevoid Start(){AEPAssurance.registerExtension();ACPCore.Start(HandleStartAdobeCallback);}}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
iOS
Register the AEPAssurance extension in your app's FinishedLaunching()
function:
Copied to your clipboardpublic override bool FinishedLaunching(UIApplication app, NSDictionary options){global::Xamarin.Forms.Forms.Init();LoadApplication(new App());AEPAssurance.RegisterExtension();// start Mobile CoreACPCore.Start(startCallback);return base.FinishedLaunching(app, options);}private void startCallback(){// set app id from the Data Collection UIACPCore.ConfigureWithAppID("yourAppId");}
Android
Register the AEPAssurance extension in your app's OnCreate()
function:
Copied to your clipboardprotected override void OnCreate(Bundle savedInstanceState){base.OnCreate(savedInstanceState);global::Xamarin.Forms.Forms.Init(this, savedInstanceState);LoadApplication(new App());AEPAssurance.RegisterExtension();// start Mobile CoreACPCore.Start(new CoreStartCompletionCallback());}class CoreStartCompletionCallback : Java.Lang.Object, IAdobeCallback{public void Call(Java.Lang.Object callback){// set app id from the Data Collection UIACPCore.ConfigureWithAppID("yourAppId");}}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Java
Register the extension when you register other extensions.
To find your app ID, which is mentioned below, please read the Mobile Install Instructions. Within the "Publishing Flow", select the small gray box next to the "Environment" dropdown.
Copied to your clipboardpublic class MobileApp extends Application {@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);try {// register other necessary extensionsAssurance.registerExtension();MobileCore.start(new AdobeCallback() {@Overridepublic void call(final Object o) {MobileCore.configureWithAppID("yourAppId");}});} catch (Exception e) {// Log the exception}}}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
When using React Native, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs.
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
Dart
When using Flutter, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs.
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
JavaScript
When using Cordova, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs.
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
C#
Register the extension in the start()
function:
Copied to your clipboardusing com.adobe.marketing.mobile;using using AOT;public class MainScript : MonoBehaviour{[MonoPInvokeCallback(typeof(AdobeStartCallback))]public static void HandleStartAdobeCallback(){// set app id from the Data Collection UIACPCore.ConfigureWithAppID("yourAppId");}// Start is called before the first frame updatevoid Start(){AEPAssurance.registerExtension();ACPCore.Start(HandleStartAdobeCallback);}}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
iOS
Register the AEPAssurance extension in your app's FinishedLaunching()
function:
Copied to your clipboardpublic override bool FinishedLaunching(UIApplication app, NSDictionary options){global::Xamarin.Forms.Forms.Init();LoadApplication(new App());AEPAssurance.RegisterExtension();// start Mobile CoreACPCore.Start(startCallback);return base.FinishedLaunching(app, options);}private void startCallback(){// set app id from the Data Collection UIACPCore.ConfigureWithAppID("yourAppId");}
Android
Register the AEPAssurance extension in your app's OnCreate()
function:
Copied to your clipboardprotected override void OnCreate(Bundle savedInstanceState){base.OnCreate(savedInstanceState);global::Xamarin.Forms.Forms.Init(this, savedInstanceState);LoadApplication(new App());AEPAssurance.RegisterExtension();// start Mobile CoreACPCore.Start(new CoreStartCompletionCallback());}class CoreStartCompletionCallback : Java.Lang.Object, IAdobeCallback{public void Call(Java.Lang.Object callback){// set app id from the Data Collection UIACPCore.ConfigureWithAppID("yourAppId");}}
Implement AEP Assurance session start APIs (iOS only)
The startSession API needs to be called to begin an Adobe Experience Platform Assurance session. When called, SDK displays a PIN authentication overlay to begin a session.
To learn how to start sessions for other platforms, please read the Platform Assurance API guide.
You may call this API when the app launches with a url (see code snippet below for sample usage)
The Assurance Android extension does not require this API to be called since it registers the app lifecycle handlers which automatically pick up any deep links and use them to start the session.
When using the Assurance iOS extension, you should call this API when the app launches with a URL (see code snippet below for sample usage).
iOS
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
Swift
Example
Copied to your clipboardfunc application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {AEPAssurance.startSession(url)return true}
In iOS 13 and later, for a scene-based application, use the UISceneDelegate
's scene(_:openURLContexts:)
method as follows:
Copied to your clipboardfunc scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {AEPAssurance.startSession((URLContexts.first!).url)}
Objective-C
Syntax
Copied to your clipboard+ (void) startSession: (NSURL* _Nonnull) url;
Example
Copied to your clipboard- (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {[AEPAssurance startSession:url];return true;}
In iOS 13 and later, for a scene-based application, use the UISceneDelegate
's scene(_:openURLContexts:)
method as follows:
Copied to your clipboard- (void) scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {UIOpenURLContext * urlContext = URLContexts.anyObject;if (urlContext != nil) {[AEPAssurance startSession:urlContext.URL];}}
To start using the extension library, you must first register the extension with the Mobile Core extension.
Swift
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// set app id from the Data Collection UIACPCore.configure(withAppId: "yourAppId")AEPAssurance.registerExtension()ACPCore.start(nil)return true;}
Objective-C
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPCore configureWithAppId:@"yourAppId"]; // set app id from the Data Collection UI[AEPAssurance registerExtension];[ACPCore start:nil];return YES;}
Swift
Example
Copied to your clipboardfunc application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {AEPAssurance.startSession(url)return true}
In iOS 13 and later, for a scene-based application, use the UISceneDelegate
's scene(_:openURLContexts:)
method as follows:
Copied to your clipboardfunc scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {AEPAssurance.startSession((URLContexts.first!).url)}
Objective-C
Syntax
Copied to your clipboard+ (void) startSession: (NSURL* _Nonnull) url;
Example
Copied to your clipboard- (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {[AEPAssurance startSession:url];return true;}
In iOS 13 and later, for a scene-based application, use the UISceneDelegate
's scene(_:openURLContexts:)
method as follows:
Copied to your clipboard- (void) scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {UIOpenURLContext * urlContext = URLContexts.anyObject;if (urlContext != nil) {[AEPAssurance startSession:urlContext.URL];}}