<!--
{
  "availability" : [
    "watchOS: 2.0.0 - 9.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKExtensionDelegate/handleUserActivity(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKExtensionDelegate(im)handleUserActivity:"
  },
  "title" : "handleUserActivity(_:)"
}
-->

# handleUserActivity(_:)

Responds to Handoff–related activity from complications and notifications.

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

## Parameters

`userInfo`

The dictionary containing data about the activity.

## Discussion

Use this method to respond to Handoff–related activity. WatchKit calls this method when your app launches as a result of a Handoff action. Use the information in the provided `userInfo` dictionary to determine how you want to respond to the action. For example, you might decide to display a specific interface controller.

The default implementation of this method does nothing. When overriding this method, don’t call `super`.

> Note:
> If you are creating a SwiftUI app for watchOS 7 or later, use the <doc://com.apple.documentation/documentation/SwiftUI/View/onContinueUserActivity(_:perform:)> modifier instead.

### Handling Activities from Complications and Notifications

WatchKit calls this method when your app launches from a complication or notification. Update your app’s user interface based on the `userInfo` parameter. Your app should seamlessly continue the interaction from the complication or notification.

When your app launches because the user tapped on a complication, the `userInfo` dictionary contains the <doc://com.apple.documentation/documentation/ClockKit/CLKLaunchedTimelineEntryDateKey> key. The value is a Date object that indicates when the complication launched.

## See Also

[`updateUserActivity(_:userInfo:webpageURL:)`](/documentation/WatchKit/WKInterfaceController/updateUserActivity(_:userInfo:webpageURL:))

Registers the current user activity with the system.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)