handle(intent:completion:)
Handles providing the image for the specified visual code.
Declaration
func handle(intent: INGetVisualCodeIntent, completion: @escaping @Sendable (INGetVisualCodeIntentResponse) -> Void)func handle(intent: INGetVisualCodeIntent) async -> INGetVisualCodeIntentResponseParameters
- 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:
- response
The Ingetvisualcodeintentresponse object containing the status of the request. This parameter must not be
nil.
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.