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).

Before you begin: Make sure you and the marketer already created a OneLink template with Universal Links, and OneLink custom link set up to direct your full app users. With the template and custom link already configured, AppsFlyer hosts and edits the AASA file to support App Clips automatically.

To add the SDK to the App Clip and route the user:

  1. Add the SDK to your App Clip
  2. Integrate the SDK
  3. [Optional] Add support for 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.

Key

Type

Value

AppsFlyerAppClip

Boolean

1

  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 links: Swift

  1. Let the marketer know that the SDK integration is completed, and tell them to implement the App Clip experience in the OneLink custom link and App Store Connect. Learn more

📘

Example

View our App Clip that demonstrates the AppsFlyer app clip integration.


Did this page help you?