Class

CNGroup

An immutable object that represents a group of contacts.

Declaration

class CNGroup : NSObject

Overview

Contacts may be members of one or more groups, depending upon their accounts.

CNGroup objects are thread-safe, and you may access their properties from any thread of your app.

Topics

Getting the Group Information

var name: String

The name of the group.

var identifier: String

The unique identifier for a group on the device.

Generating Search Predicates for Groups

The predicates to match groups. You can only use these predicates with CNGroup.

class func predicateForGroups(withIdentifiers: [String]) -> NSPredicate

Returns a predicate to find groups with the specified identifiers.

class func predicateForGroupsInContainer(withIdentifier: String) -> NSPredicate

Returns a predicate to find groups in the specified container.

class func predicateForSubgroupsInGroup(withIdentifier: String) -> NSPredicate

Returns a predicate to find subgroups in the specified parent group.

Getting Group-Related Keys

let CNGroupIdentifierKey: String

The identifier of the group.

let CNGroupNameKey: String

The name of the group.

See Also

Groups and Containers

class CNMutableGroup

A mutable object that represents a group of contacts.

class CNContainer

An immutable object that represents a collection of contacts.

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