---
title: INGetVisualCodeIntent
framework: intents
role: symbol
role_heading: Class
path: intents/ingetvisualcodeintent
---

# INGetVisualCodeIntent

A request for a visual code to use for exchanging payment and contact information.

## Declaration

```swift
class INGetVisualCodeIntent
```

## Overview

Overview Siri creates an INGetVisualCodeIntent object when the user asks for a visual code to use with a scanner. A visual code is a bar code or QR code that embeds information about a transaction. For example, an app might provide a visual code to facilitate payment for services. Apps can also use visual codes to communicate a user’s contact information. To handle this intent, the handler object in your Intents extension must adopt the INGetVisualCodeIntentHandling protocol. Your handler should confirm the request and create an INGetVisualCodeIntentResponse object with an image containing the visual code. Siri handles the display of the provided visual code in order to scan it. Additional Intent Attributes The following table lists additional attributes of this intent object:  |   |   |  When performing a search, Siri automatically asks the user to unlock a currently locked device. You don’t need to explicitly ask to unlock the device. In addition, Siri always prompts the user to confirm the request before asking your Intents extension to handle it. Example Phrases Users can ask Siri to display visual codes in a variety of ways. The table below provides a few sample phrases in different languages. You can use these phrases during testing to trigger your intents. This list isn’t exhaustive and Siri may recognize many other phrases.  |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |

## Topics

### Initializing the Intent Object

- [init(visualCodeType:)](intents/ingetvisualcodeintent/init(visualcodetype:).md)

### Getting the Visual Code Type

- [visualCodeType](intents/ingetvisualcodeintent/visualcodetype.md)
- [INVisualCodeType](intents/invisualcodetype.md)

## Relationships

### Inherits From

- [INIntent](intents/inintent.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [INIntentSetImageKeyPath](intents/inintentsetimagekeypath.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Visual Codes

- [INGetVisualCodeIntentHandling](intents/ingetvisualcodeintenthandling.md)
- [INGetVisualCodeIntentResponse](intents/ingetvisualcodeintentresponse.md)
