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:

  1. 在App Clip中添加SDK
  2. Integrate the SDK
  3. 【可选】适配Scene Delegate
  4. 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.
关键类型
AppsFlyerAppClipBoolean1
  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

  1. 【可选】配置App Clip到完整版应用的归因

  2. 通知市场人员SDK对接已完成,让他们在OneLink自定义链接以及App Store Connect中添加App Clip体验。了解详情

📘

举例

查看App Clip对接示例