application(_:continue:restorationHandler:)

AppDelegate.reachfive().application(application, continue: userActivity, restorationHandler: restorationHandler)

Description

Allows ReachFive to handle user activity continuation such as handoffs, and more importantly, universal links.

This method is required by WeChat and by a custom provider whose callback arrives as a universal link (NSUserActivityTypeBrowsingWeb).

WebProvider does not support leaving your app and coming back with a universal link. The universal link callback in .universalLink mode is intercepted by the authentication sheet itself.

Call this method in response to the equivalent UIKit method application(:continue:restorationHandler:). If your app uses scenes, forward scene(:continue:) here as well.

The method returns a Bool that tells you whether ReachFive actually consumed the activity. Do not assume ReachFive handles every universal link you forward. When false is returned, your app should route the link itself.

Delivering an https URL into the app requires an applinks:<host> Associated Domain. See guides/apple-app-site-association.adoc#applinks.

Examples

import Reach5
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
        return AppDelegate.reachfive().application(application, continue: userActivity, restorationHandler: restorationHandler)
    }
}

Parameters

Parameter Description

application UIApplication

The UIKit Application instance.

For more details, see Apple: UIApplication.

userActivity NSUserActivity

The activity object containing the data associated with the task the user was performing.

restorationHandler ([UIUserActivityRestoring]?) → Void

A block to execute if your app creates objects to perform the task the user was performing.

R5 AI Assistant

Confirm Deletion