---
title: "handleUserActivity(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkapplicationdelegate/handleuseractivity(_:)"
---

# handleUserActivity(_:)

Responds to Handoff–related activity from complications and notifications.

## Declaration

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

## Parameters

- `userInfo`: The dictionary containing data about the activity.

## Discussion

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 view. The default implementation of this method does nothing. When overriding this method, don’t call super. note: If you’re creating a SwiftUI app for watchOS 7 or later, use the onContinueUserActivity(_:perform:) modifier instead.

## See Also

### Related Documentation

- [updateUserActivity(_:userInfo:webpageURL:)](watchkit/wkinterfacecontroller/updateuseractivity(_:userinfo:webpageurl:).md)

### Coordinating Handoff activity

- [handle(_:)](watchkit/wkapplicationdelegate/handle(_:)-3kqsk.md)
