Assurance API reference

extensionVersion

Returns the current version of the AEP Assurance extension
Android
iOS
React Native
Flutter
Cordova
Unity
Xamarin

Java

Syntax

1
public static String extensionVersion()
Copied!

Example

1
Assurance.extensionVersion()
Copied!

Objective-C

Syntax

1
+ (nonnull NSString*) extensionVersion;
Copied!

Example

1
[AEPAssurance extensionVersion];
Copied!

Swift

Example

1
AEPAssurance.extensionVersion()
Copied!

JavaScript

Example

1
AEPAssurance.extensionVersion().then(version => console.log("AdobeExperienceSDK: AEP Assurance version: " + version));
Copied!

Dart

Syntax

1
static Future<String> get extensionVersion async
Copied!

Example

1
assuranceVersion = await FlutterAssurance.extensionVersion;
Copied!

Syntax

1
AEPAssurance.extensionVersion = function(success, fail);
Copied!

Example

1
AEPAssurance.extensionVersion(function(version) {
2
console.log("AEPAssurance version: " + version);
3
}, function(error) {
4
console.log(error);
5
});
Copied!

Syntax

1
public static string ExtensionVersion()
Copied!

Example in C#

1
string version = AEPAssurance.ExtensionVersion();
2
print(LOG_TAG + "Assurance version: "+version);
Copied!

Example in C#

1
string version = AEPAssurance.ExtensionVersion()
2
Console.WriteLine("AEPAssurance version installed is: " + version);
Copied!

startSession

The startSession API needs to be called to begin a AEP Assurance 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
React Native
Flutter
Cordova
Unity
Xamarin
This API is optional for Android.
Android does not require this API to be called. When the registerExtension API is called, AEP Assurance extension registers the app lifecycle handlers which automatically pick up any deep links and use them to start the session.

Java

Syntax

1
public static void startSession(final String url)
Copied!

Example

1
Assurance.startSession(url);
Copied!

Objective-C

Syntax

1
+ (void) startSession: (NSURL* _Nonnull) url;
Copied!

Example

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

Swift

Example

1
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
2
do {
3
AEPAssurance.startSession(url)
4
return false
5
}
6
}
Copied!
For SceneDelegate based applications
1
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
2
AEPAssurance.startSession(URLContexts.first!.url)
3
}
Copied!

JavaScript

Example

1
AEPAssurance.startSession("your-griffon-session-url");
Copied!

Dart

Syntax

1
static Future<void> startSession(String url);
Copied!

Example

1
FlutterAssurance.startSession(url);
Copied!

Syntax

1
AEPAssurance.startSession = function(sessionurl,success, fail);
Copied!

Example

1
AEPAssurance.startSession(url,function(result) {
2
console.log("AdobeExperenceSDK: AEPAssurance session started succesfully: " + result);
3
}, function(error) {
4
console.log("AdobeExperenceSDK: Failed to start AEPAssurance session: " + error);
5
});
Copied!

Syntax

1
public static void StartSession(string url)
Copied!

Example in C#

1
AEPAssurance.StartSession(url);
Copied!

Example in C#

1
AEPAssurance.StartSession(url);
Copied!
Last modified 1mo ago
Export as PDF
Copy link