resolveContacts(for:with:)
Resolves the recipients of the call.
Declaration
optional func resolveContacts(for intent: INStartCallIntent, with completion: @escaping @Sendable ([INStartCallContactResolutionResult]) -> Void)optional func resolveContacts(for intent: INStartCallIntent) async -> [INStartCallContactResolutionResult]Parameters
- intent:
The intent object that contains details about 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 while implementing this method. This handler has no return value and takes the following parameter:
- resolutionResult
The object containing the details of your proposed resolution. For a successful resolution, create a resolution result that includes the Inperson object with the information that you need to call the user later.
Discussion
This method verifies the identity of any intended call recipients. Always strive toward a successful resolution to a specific user, but feel free to ask the user for confirmation of the selected contact if there’s some uncertainty.
If you find multiple users matching the same name, consider asking the user to disambiguate from among the most likely candidates. When disambiguating users, provide only a few choices. If you find more than five possible users, consider a different resolution.