---
title: "resolveVisualCodeType(for:with:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/ingetvisualcodeintenthandling/resolvevisualcodetype(for:with:)"
---

# resolveVisualCodeType(for:with:)

Resolves the type of code requested by the user.

## Declaration

```swift
optional func resolveVisualCodeType(for intent: INGetVisualCodeIntent, with completion: @escaping @Sendable (INVisualCodeTypeResolutionResult) -> Void)
```

```swift
optional func resolveVisualCodeType(for intent: INGetVisualCodeIntent) async -> INVisualCodeTypeResolutionResult
```

## Parameters

- `intent`: The intent object containing details of the user’s request. Use this object to get the initial information, if any, provided by the user.
- `completion`: The handler block to execute with the resolution. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

## Discussion

Discussion Implement this method to verify that your app supports providing a code of the specified type. If your app supports the requested code or supports only one type of code, return a resolution of success with the code type that you support. If your app doesn’t support the requested type of visual code, provide a resolution asking the user to confirm the code type that you do support.
