<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INShareFocusStatusIntentResponse/init(code:userActivity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INShareFocusStatusIntentResponse(im)initWithCode:userActivity:"
  },
  "title" : "init(code:userActivity:)"
}
-->

# init(code:userActivity:)

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

```
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.

---

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)