Assurance API reference
extensionVersion
Returns the current version of the AEP Assurance extension.
Android Java
data-slots=heading, code
data-repeat=2
Syntax
@NonNull
public static String extensionVersion()
Example
final String extensionVersion = Assurance.extensionVersion();
Android Kotlin
data-slots=heading, code
data-repeat=1
Example
val extensionVersion: String = Assurance.extensionVersion()
iOS Swift
data-slots=heading, code
data-repeat=1
Example
AEPAssurance.extensionVersion()
iOS Objective-C
data-slots=heading, code
data-repeat=2
Syntax
+ (nonnull NSString*) extensionVersion;
Example
[AEPAssurance extensionVersion];
registerExtension
data-variant=warning
data-slots=text1, text2
This API has been deprecated starting in v2.0.0 and removed in v3.0.0 of the Android mobile extension.
Use
MobileCore.registerExtensions() API instead.Registers the Assurance extension with the Mobile Core.
Android Java
data-slots=heading, code
data-repeat=2
Syntax
public static void registerExtension()
Example
Assurance.registerExtension();
startSession
The startSession API needs to be called to begin a AEP Assurance session. When called, the Mobile SDK displays a PIN authentication overlay to begin a session.
data-variant=info
data-slots=text
You may call this API when the app launches with a URL (see code snippet below for sample usage)
data-variant=info
data-slots=text
This API is optional for Android. Deep linking is the best way to connect to an Assurance session when using the Android SDK. Assurance SDK on Android is already setup to handle incoming intents to your app. You can add an intent filter for incoming links in your app to complete the deep link configuration.
Android Java
data-slots=heading, code
data-repeat=2
Syntax
public static void startSession(@NonNull final String url)
Example
final String url = "<assurance_session_url>";
Assurance.startSession(url);
Android Kotlin
data-slots=heading, code
data-repeat=1
Example
val url: String = "<assurance_session_url>"
Assurance.startSession(url)
iOS Swift
data-slots=heading, code
data-repeat=1
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)
}
iOS Objective-C
data-slots=heading, code
data-repeat=2
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;
}
startSession (Quick Connect)
Displays a Quick Connect authorization overlay to begin an Experience Platform Assurance session.
data-variant=info
data-slots=text
This API is only supported on debug builds. Calling this method on a non-debuggable build will result in a no-op.
Android Java
data-slots=heading, code
data-repeat=2
Syntax
public static void startSession()
Example
Assurance.startSession();
Android Kotlin
data-slots=heading, code
data-repeat=1
Example
Assurance.startSession()
iOS Swift
data-slots=heading, code
data-repeat=2
Syntax
static func startSession()
Example
AEPAssurance.startSession()
iOS Objective-C
data-slots=heading, code
data-repeat=2
Syntax
+ (void) startSession;
Example
[AEPAssurance startSession];