resolveVisualCodeType(for:with:)
Resolves the type of code requested by the user.
Declaration
optional func resolveVisualCodeType(for intent: INGetVisualCodeIntent, with completion: @escaping @Sendable (INVisualCodeTypeResolutionResult) -> Void)optional func resolveVisualCodeType(for intent: INGetVisualCodeIntent) async -> INVisualCodeTypeResolutionResultParameters
- 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:
- resolutionResult
The resolution object containing your proposed resolution. For successful resolutions, create a resolution object whose value is the Invisualcodetype value representing the requested code type. This parameter must not be
nil.
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.