Assurance API reference

extensionVersion

Returns the current version of the AEPAssurance extension

Android
iOS
Flutter
Android

Java

Syntax

public static String extensionVersion()

Example

Assurance.extensionVersion()
iOS

Objective-C

Syntax

+ (nonnull NSString*) extensionVersion;

Example

[AEPAssurance extensionVersion];

Swift

Example

AEPAssurance.extensionVersion()
Flutter

Dart

Syntax

static Future<String> get extensionVersion async

Example

assuranceVersion = await FlutterAssurance.extensionVersion;

startSession

The startSession API needs to be called to begin a AEPAssurance session. When called, SDK displays a PIN authentication overlay to begin a session.

You may call this API when the app launches with a url (see code snippet below for sample usage)

Android
iOS
Flutter
Android

This API is optional for Android.

Android does not require this API to be called. When the registerExtension API is called, Assurance extension registers the app lifecycle handlers which automatically pick up any deep links and use them to start the session.

Java

Syntax

public static void startSession(final String url)

Example

Assurance.startSession(url);
iOS

Objective-C

Syntax

+ (void) startSession: (NSURL* _Nonnull) url;

Example

- (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
[AEPAssurance startSession:url];
return false;
}

Swift

Example

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
do {
AEPAssurance.startSession(url)
return false
}
}

For SceneDelegate based applications

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
AEPAssurance.startSession(URLContexts.first!.url)
}
Flutter

Dart

Syntax

static Future<void> startSession(String url);

Example

FlutterAssurance.startSession(url);