AppDelegateObserving

public protocol AppDelegateObserving : AnyObject

This protocol defines an API which makes possible to observe and react to the AppDelegate’s methods.

  • Asks the delegate to open a resource specified by a URL, and provides a dictionary of launch options. This method is not called if your implementations return false from both the application(:willFinishLaunchingWithOptions:) and application(:didFinishLaunchingWithOptions:) methods. (If only one of the two methods is implemented, its return value determines whether this method is called.) If your app implements the applicationDidFinishLaunching(:) method instead of application(:didFinishLaunchingWithOptions:), this method is called to open the specified URL after the app has been initialized. If a URL arrives while your app is suspended or running in the background, the system moves your app to the foreground prior to calling this method. There is no equivalent notification for this delegation method.

    Declaration

    Swift

    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool
  • Called on the main thread after the NSUserActivity object is available. Use the data you stored in the NSUserActivity object to re-create what the user was doing. You can create/fetch any restorable objects associated with the user activity, and pass them to the restorationHandler. They will then have the UIResponder restoreUserActivityState: method invoked with the user activity. Invoking the restorationHandler is optional. It may be copied and invoked later, and it will bounce to the main thread to complete its work and call restoreUserActivityState on all objects.

    Declaration

    Swift

    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool