An object representing a person in the context of search results.


class CSPerson : NSObject


A CSPerson object represents a person in the context of search results. You can create a CSPerson object when you have a display name and a contact handle of some kind, such as an email address or phone number.

If you create a CSPerson object to represent a specific contact, you can use the value of the contact’s identifier property for the person object’s contactIdentifier property. Using the same value lets you avoid using names or phone numbers to look up the contact that’s associated with a person.


Initializing a Person Object

init(displayName: String?, handles: [String], handleIdentifier: String)

Returns a new CSPerson object initialized with the specified display name and contact attributes.

Accessing Person Properties

var contactIdentifier: String?

The identifier for the contact associated with the person.

var displayName: String?

A display name for the person.

var handleIdentifier: String

A key that identifies the type of contact property represented by the person object’s handle.

var handles: [String]

An array of contact handles related to the person.


Inherits From

See Also


class CSSearchQuery

The criteria to apply when searching previously indexed app content.

class CSLocalizedString

An object displaying localized text in search results related to your app.