Instance Method

add(_:toContainerWithIdentifier:)

Adds the specified contact to the contact store.

Declaration

func add(_ contact: CNMutableContact, toContainerWithIdentifier identifier: String?)

Parameters

contact

The new contact to add.

identifier

The identifier of the container to add the new contact. To add the new contact to the default container set identifier to nil.

Discussion

This method overrides any previously made deletion requests for the contact. The new contact may be modified by executing the save request.

See Also

Saving a Contact Changes

func update(CNMutableContact)

Updates an existing contact in the contact store.

func delete(CNMutableContact)

Deletes a contact from the contact store.

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