The developer routes the user to the correct activity using the invocation URL (the QR code, NFC tag, etc. that invokes the App Clip).
To add the SDK to the App Clip and route the user:
- Add the SDK to your App Clip
- Retrieve your dev key
- Configure the SDK in app delegate
- Initialize the SDK
- Add support for scene delegate
- In the Information Property List (
info.plist
file), add the following row with the key and value as detailed in the following table.
Key | Type | Value |
---|---|---|
|
|
|
- Add the following code to
sceneDelegate
:
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
// Must for AppsFlyer attrib
AppsFlyerLib.shared().continue(userActivity, restorationHandler: nil)
}
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let _ = (scene as? UIWindowScene) else { return }
if let userActivity = connectionOptions.userActivities.first {
self.scene(scene, continue: userActivity)
}
return
}
⇲ Github links: Swift
Updated 2 months ago