Instance Method


Responds to Handoff–related activity.


func handleUserActivity(_ userInfo: [AnyHashable : Any]?)



The dictionary containing data about the activity. When launching an app from its glance, WatchKit sets this parameter to the dictionary that the glance passed to the updateUserActivity(_:userInfo:webpageURL:) method.


Implement this method in your app’s initial interface controller and use it to respond to Handoff–related activity. If you do not implement the handleUserActivity(_:) method in your app’s extension delegate, WatchKit calls this method on your app’s initial interface controller. (If your app uses a page-based interface, WatchKit calls this method for each interface controller that is part of your initial interface.) Your implementation of this method should look at the userInfo dictionary and decide what actions (if any) to take. For example, an interface controller in a page-based interface might make itself the current page.

The default implementation of this method does nothing. When overriding this method, do not call super.

See Also

Deprecated Symbols

func presentController([(name: String, context: AnyObject)])

Presents a page-based interface modally.

func updateUserActivity(String, userInfo: [AnyHashable : Any]?, webpageURL: URL?)

Registers the current user activity with the system

class func reloadRootControllers(withNames: [String], contexts: [Any]?)

Loads the specified interface controllers and rebuilds the app’s page-based interface.

Text Response Key

Keys for retrieving text response information.