Add the required dependencies to your project by including them in the app's Gradle file.
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:assurance")
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Add the required dependencies to your project by including them in the app's Gradle file.
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:assurance'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Add the required dependencies to your project using CocoaPods. Add following pods in your Podfile
:
Copied to your clipboarduse_frameworks!target 'YourTargetApp' dopod 'AEPCore','~> 5.0'pod 'AEPAssurance','~> 5.0'end
Deep linking is the best way to connnect 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. The combination of android:host
and android:scheme
(in the form of <host>://<scheme>
) for this intent filter will serve as the Base URL while creating a session in the Adobe Experience Platform Assurance UI
The startSession API needs to be called to begin an Adobe Experience Platform Assurance session. You should call this API when the app launches with a URL (see code snippet below for sample usage). When called, SDK displays a PIN authentication overlay to begin a session.
Swift
Example
Copied to your clipboardfunc application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {Assurance.startSession(url: 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>) {// Called when the app in background is opened with a deep link.if let deepLinkURL = URLContexts.first?.url {Assurance.startSession(url: deepLinkURL)}}func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {// Called when the app launches with the deep linkif let deepLinkURL = connectionOptions.urlContexts.first?.url {Assurance.startSession(url: deepLinkURL)}}
Objective-C
Syntax
Copied to your clipboardstatic func startSession(url: URL?)
Example
Copied to your clipboard- (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {[AEPMobileAssurance startSessionWithUrl: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 willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {NSURL *deepLinkURL = connectionOptions.URLContexts.allObjects.firstObject.URL;[AEPMobileAssurance startSessionWithUrl:deepLinkURL];}- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {[AEPMobileAssurance startSessionWithUrl:URLContexts.allObjects.firstObject.URL];}