siriMatches

siriMatches

siriMatches Instance Property of INPerson The list of matches Siri provides for you to resolve or disambiguate.

var siriMatches: [INPerson]? { get }

Discussion

When attempting to resolve the recipient of a message, use this property to determine how to respond:

  • If the array contains a single match and your app successfully identifies that person by their `doc://com.apple.sirikit/documentation/Intents/INPerson/contactIdentifier or doc://com.apple.sirikit/documentation/Intents/INPerson/customIdentifier, use the doc://com.apple.sirikit/documentation/Intents/INPersonResolutionResult/success(with:)` method to resolve the recipient.
  • If the array contains multiple people and those people each have distinct `doc://com.apple.sirikit/documentation/Intents/INPerson/contactIdentifier or doc://com.apple.sirikit/documentation/Intents/INPerson/customIdentifier values, ignore any your app can’t identify and then respond according to the number of remaining matches. For example, if there are still two or more matches, use the doc://com.apple.sirikit/documentation/Intents/INPersonResolutionResult/disambiguation(with:)` method to ask the person interacting with Siri to choose.
  • If the array contains multiple people and they all have the same `doc://com.apple.sirikit/documentation/Intents/INPerson/contactIdentifier, disambiguate using doc://com.apple.sirikit/documentation/Intents/INPerson/personHandle instead. If your app doesn’t use handles, simply pass any match to the doc://com.apple.sirikit/documentation/Intents/INPersonResolutionResult/success(with:)` method.
  • If the array is empty or the property is nil, search your app’s contacts for people matching those in the `doc://com.apple.sirikit/documentation/Intents/INSendMessageIntent/recipients property of doc://com.apple.sirikit/documentation/Intents/INSendMessageIntent` instead. Use the resolution method that best describes the outcome of that search.