Initializer

init(handle:displayName:contactIdentifier:)

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

Declaration

convenience init(handle: String, displayName: String?, 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.

displayName

The string you display for the user’s name.

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 as a convenient way to create person objects that do not require an image.