The information about a user involved in a SiriKit interaction.
- iOS 10.0+
- Mac Catalyst 13.0+
- watchOS 3.2+
INPerson objects to represent users with many different roles, including the sender or recipient of calls and messages, the payer or payee of a financial transaction, or the driver of a vehicle. You also use person objects to identify the corresponding user in your app and to communicate information about that user back to SiriKit.
When resolving the parameters of an intent, use any provided
INPerson objects to identify the corresponding users in your app. A person object contains information provided by the initial request, which could be as little as a single name spoken by the user. (If the
custom property has a value, you can use it to retrieve additional information from the Contacts database). After identifying the user, create a new
INPerson object and fill it with the information that you need to identify the user again later. For example, you might specify a value for
person property that contains the information about how your app identifies the user.
When resolving the identities of people, SiriKit leverages the information in the user’s contacts database when that information is available. If the user denies your app access to their contacts, SiriKit can’t use that information, which might cause many properties of a person object to be
nil. Because the
INPerson class conforms to the
INSpeakable protocol, though, SiriKit still populates the
spoken property with what the user said, and you can use that information to try to identify the user. For more information about that protocol, see