resolveContacts(for:with:)
Resolves the recipients of the call.
Declaration
optional func resolveContacts(for intent: INStartAudioCallIntent, with completion: @escaping @Sendable ([INPersonResolutionResult]) -> Void)optional func resolveContacts(for intent: INStartAudioCallIntent) async -> [INPersonResolutionResult]Parameters
- intent:
The intent object containing details about the user’s request. Use the information in this object to resolve the list of contacts.
- 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:
- resolutionResults
The object containing the details of your proposed resolution. For each successful resolution, create a resolution result that includes the Inperson object with the information that you need to call the user later.
Discussion
Use this method to verify the identity of any intended call recipients. Always strive toward a successful resolution to a specific user, but feel free to ask for confirmation of the selected user 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 as few choices as possible. If you find more than five possible users, consider a different resolution.