Contacts provides access to the user's contacts database on iOS, macOS, watchOS, and visionOS, letting your app fetch, format, and manage contact records and the groups that organize them. You request access through CNContactStore subject to CNAuthorizationStatus, then read or modify records using CNContact and its mutable counterpart CNMutableContact, retrieve them with CNContactFetchRequest, and arrange them with CNGroup and CNContainer. Use CNContactFormatter to render display names, CNLabeledValue to attach labeled fields such as CNInstantMessageAddress or CNMutablePostalAddress, and CNContactVCardSerialization to import and export vCard data. To track edits over time, fetch change history with CNChangeHistoryFetchRequest and process the resulting events, including CNChangeHistoryAddContactEvent and CNChangeHistoryUpdateGroupEvent, through a CNChangeHistoryEventVisitor.
Essentials 3
The store you use to request access to and fetch records from the user's contacts database.
- ClCNContactStoreiOS 9.0+@abstract Provides methods to fetch and save contacts.
- EnCNAuthorizationStatusiOS 9.0+@abstract The authorization the user has given the application to access an entity type.
- EnCNEntityTypeiOS 9.0+@abstract The entities the user can grant access to.
Contacts 3
The immutable and mutable record types that represent individual people and organizations.
- ClCNContactiOS 9.0+@abstract An immutable value object representing a contact.
- ClCNMutableContactiOS 9.0+@abstract A mutable value object representing a contact.
- EnCNContactTypeiOS 9.0+Constants that indicate whether a contact represents a person or an organization.
Contact Properties 9
The labeled fields and value types that make up a contact's information.
- ClCNLabeledValueiOS 9.0+@abstract A contact property that has a value and label.
- ClCNContactPropertyiOS 9.0+@abstract Contains related information for a specific contact property.
- ClCNContactRelationiOS 9.0+@abstract An immutable value object representing a related contact.
- ClCNPhoneNumberiOS 9.0+@abstract An immutable value object representing a phone number.
- ClCNPostalAddressiOS 9.0+@abstract An immutable value object representing a postal address.
- ClCNMutablePostalAddressiOS 9.0+@abstract A mutable value object representing a postal address.
- ClCNInstantMessageAddressiOS 9.0+@abstract An immutable value object representing an instant message address.
- ClCNSocialProfileiOS 9.0+@abstract An immutable value object representing a social profile.
- PrCNKeyDescriptorThis protocol is reserved for Contacts framework usage.
Groups and Containers 4
The collections that organize contacts into groups and account-backed containers.
- ClCNGroupiOS 9.0+@abstract An immutable value object representing a group.
- ClCNMutableGroupiOS 9.0+@abstract A mutable value object representing a group.
- ClCNContaineriOS 9.0+@abstract An immutable value object representing a container.
- EnCNContainerTypeiOS 9.0+Constants that identify the type of account a container belongs to, such as local or CardDAV.
Fetching and Saving 5
The requests and results you use to read records from and commit changes to the contacts database.
- ClCNFetchRequestiOS 9.0+The abstract base class for requests that fetch records from the contacts database.
- ClCNContactFetchRequestiOS 9.0+@abstract Specifies the search criteria to fetch contacts.
- ClCNFetchResultiOS 13.0+An object that holds the results of a fetch request, including a token for tracking changes.
- ClCNSaveRequestiOS 9+@abstract Specifies the changes to save.
- EnCNContactSortOrderiOS 9.0+@abstract Sort order for contacts.
Formatting Names and Addresses 6
The formatters and styles that render contact display names and postal addresses.
- ClCNContactFormatteriOS 9.0+@abstract Formats a contact name.
- EnCNContactFormatterStyleiOS 9.0+@abstract The formatting styles for contact names.
- EnCNContactDisplayNameOrderiOS 9.0+@abstract The formatting order of the contact name components.
- ClCNPostalAddressFormatteriOS 9.0+@abstract Formats a postal address.
- EnCNPostalAddressFormatterStyleiOS 9.0+@abstract The formatting styles for postal addresses.
- ClCNContactsUserDefaultsiOS 9.0+@abstract The user defaults for contacts.
vCard Serialization 1
The serialization support for importing and exporting contacts as vCard data.
- ClCNContactVCardSerializationiOS 9.0+@abstract Contact vCard support.
Change History 14
The request, events, and visitor you use to track additions, updates, and deletions over time.
- ClCNChangeHistoryFetchRequestiOS 13.0+@abstract Specifies the criteria to fetch change history.
- ClCNChangeHistoryEventiOS 13.0+The abstract base class for events that describe a change in the contacts database history.
- PrCNChangeHistoryEventVisitoriOS 13.0+A protocol that processes change history events as they are enumerated.
- ClCNChangeHistoryDropEverythingEventiOS 13.0+Drop all cached information your app has persisted
- ClCNChangeHistoryAddContactEventiOS 13.0+A contact was added
- ClCNChangeHistoryUpdateContactEventiOS 13.0+A contact was updated
- ClCNChangeHistoryDeleteContactEventiOS 13.0+A contact was removed
- ClCNChangeHistoryAddGroupEventiOS 13.0+A group was added
- ClCNChangeHistoryUpdateGroupEventiOS 13.0+A group was updated
- ClCNChangeHistoryDeleteGroupEventiOS 13.0+A group was deleted
- ClCNChangeHistoryAddMemberToGroupEventiOS 13.0+A contact was added to a group
- ClCNChangeHistoryRemoveMemberFromGroupEventiOS 13.0+A contact was removed from a group
- ClCNChangeHistoryAddSubgroupToGroupEventiOS 13.0+A subgroup was added to a group
- ClCNChangeHistoryRemoveSubgroupFromGroupEventiOS 13.0+A subgroup was removed from a group
Errors 1
The error type reported by Contacts operations.
- StCNErroriOS 9.0+A structure that describes errors reported by Contacts framework operations.