App Clip SDK integration
The developer routes the user to the correct activity using the invocation URL (the QR code, NFC tag, etc. that invokes the App Clip).
前期准备:确保您和市场人员已经使用Universal Links创建了OneLink模板,且OneLink自定义链接已设置完成,可以引导完整版应用的用户。模板和自定义链接配置完成后,AppsFlyer会讲AASA文件保存在服务器中,并自动修改文件以确保App Clip的适配性。请注意:AASA文件更新可能需要几小时。
To add the SDK to the App Clip and route the user:
- 在App Clip中添加SDK
- Integrate the SDK
- 【可选】适配Scene Delegate
- In the Information Property List (
info.plist
file) for the app clip, add the following row with the key and value as detailed in the following table.
关键 | 类型 | 值 |
---|---|---|
AppsFlyerAppClip | Boolean | 1 |
- 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链接:Swift
-
【可选】配置App Clip到完整版应用的归因
-
通知市场人员SDK对接已完成,让他们在OneLink自定义链接以及App Store Connect中添加App Clip体验。了解详情
举例
已更新 about 1 year ago
What’s Next