Contents

init(handle:nameComponents:displayName:image:contactIdentifier:)

Creates a person object with the specified name and contact information.

Declaration

convenience init(handle: String, nameComponents: PersonNameComponents?, displayName: String?, image: INImage?, contactIdentifier: String?)

Parameters

  • handle:

    A string containing information that your app uses to identify the user. You can use an email address, phone number, account name, or any information that lets you identify the user uniquely.

  • nameComponents:

    The name of the user, specified as a set of name components.

  • displayName:

    The string you display for the user’s name.

  • image:

    An image of the person.

  • contactIdentifier:

    The identifier associated with the user’s Cncontact object. Specify a value for this parameter when the user has a corresponding entry in the Contacts database.

Return Value

An initialized person object or nil if the object could not be created.

Discussion

Use this method when creating person objects you plan to return as part of a response to Siri. Always specify as much information as possible about the user.