---
title: "handle(intent:completion:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/ingetvisualcodeintenthandling/handle(intent:completion:)"
---

# handle(intent:completion:)

Handles providing the image for the specified visual code.

## Declaration

```swift
func handle(intent: INGetVisualCodeIntent, completion: @escaping @Sendable (INGetVisualCodeIntentResponse) -> Void)
```

```swift
func handle(intent: INGetVisualCodeIntent) async -> INGetVisualCodeIntentResponse
```

## Parameters

- `intent`: The intent object containing details about the user’s request. Your handler object has already resolved and confirmed the information in this intent.
- `completion`: The handler block to execute with your response. 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 Your implementation of this method should create an image for the requested visual code. Place that image in your response object and call the provided handler block.
