<!--
{
  "availability" : [
    "iOS: 11.0.0 - 15.0.0",
    "iPadOS: 11.0.0 - 15.0.0",
    "macCatalyst: 13.1.0 - 15.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 4.0.0 - 8.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INGetVisualCodeIntentResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INGetVisualCodeIntentResponse"
  },
  "title" : "INGetVisualCodeIntentResponse"
}
-->

# INGetVisualCodeIntentResponse

Your app’s response to a request for a visual code.

```
class INGetVisualCodeIntentResponse
```

## Overview

Use an [`INGetVisualCodeIntentResponse`](/documentation/Intents/INGetVisualCodeIntentResponse) object to provide the visual code to display. When handling the intent, provide an image with the requested visual code. Siri communicates the details back to the user at appropriate times.

You create an [`INGetVisualCodeIntentResponse`](/documentation/Intents/INGetVisualCodeIntentResponse) object in the [`confirm(intent:completion:)`](/documentation/Intents/INGetVisualCodeIntentHandling/confirm(intent:completion:)) and [`handle(intent:completion:)`](/documentation/Intents/INGetVisualCodeIntentHandling/handle(intent:completion:)) methods of your handler object. For more information about implementing your handler object, see [`INGetVisualCodeIntentHandling`](/documentation/Intents/INGetVisualCodeIntentHandling).

## Topics

### Initializing the Response Object

[`init(code: INGetVisualCodeIntentResponseCode, userActivity: NSUserActivity?)`](/documentation/Intents/INGetVisualCodeIntentResponse/init(code:userActivity:))

Initializes the response object with the specified code and user activity object.

### Getting the Response Code

[`var code: INGetVisualCodeIntentResponseCode`](/documentation/Intents/INGetVisualCodeIntentResponse/code)

The code indicating whether you successfully handled the intent.

[`enum INGetVisualCodeIntentResponseCode`](/documentation/Intents/INGetVisualCodeIntentResponseCode)

Constants indicating the state of the response.

### Providing the Code Image

[`var visualCodeImage: INImage?`](/documentation/Intents/INGetVisualCodeIntentResponse/visualCodeImage)

The image containing the visual code.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`INIntentResponse`](/documentation/Intents/INIntentResponse)

---

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)