---
title: "init(code:userActivity:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/insharefocusstatusintentresponse/init(code:useractivity:)"
---

# init(code:userActivity:)

Creates a response with the specified response code and user activity.

## Declaration

```swift
init(code: INShareFocusStatusIntentResponseCode, userActivity: NSUserActivity?)
```

## Parameters

- `code`: Your app’s ability to handle the intent.
- `userActivity`: An object the system can send to your app to continue this interaction.
