Class

CSPerson

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

Declaration

class CSPerson : NSObject

Overview

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.

Topics

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.

Relationships

Inherits From

See Also

Queries

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software