Edit in GitHubLog an issue

Adobe Experience Platform Assurance extension

This extension enables capabilities for Adobe Experience Platform Assurance.

To get started with Assurance in your app, you'll need to:

  1. Install the AEP Assurance extension in the Data Collection UI
  2. Add AEP Assurance SDK extension library to your app
    1. Import AEP Assurance into your app
    2. 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:

  1. In the Data Collection UI, select the Extensions tab.
  2. On the Catalog tab, locate the AEP Assurance extension, and select Install.
  3. Follow the publishing process to update the Mobile SDK configuration.

assurance extension

Add the AEP Assurance extension to your app

Import the library to your app code

  1. Add the following libraries in your project's build.gradle file:
Copied to your clipboard
implementation 'com.adobe.marketing.mobile:core:1+'
implementation 'com.adobe.marketing.mobile:assurance:1+'
  1. Import the Assurance library along with the other Mobile SDK libraries:
Copied to your clipboard
import 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 clipboard
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// set app id from the Data Collection UI
ACPCore.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.

install instructions

Copied to your clipboard
public class MobileApp extends Application {
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
try {
// register other necessary extensions
Assurance.registerExtension();
MobileCore.start(new AdobeCallback() {
@Override
public 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 clipboard
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// set app id from the Data Collection UI
ACPCore.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;
}

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.

To start using the extension library, you must first register the extension with the Mobile Core extension.

Swift

Copied to your clipboard
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// set app id from the Data Collection UI
ACPCore.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 clipboard
func 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 clipboard
func 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];
}
}
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.