An object that collects the changes you want to save to the user's contacts database.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
Create a new
CNSave object for each save operation you want to make. You can batch multiple changes into one save request (note that these changes only apply to objects). In the case of overlapping changes in multiple or concurrent save requests, the last change wins.
If you try to add an object (that is, a contact or a group) that already exists in the contact store, you receive the
CNError error and the
CNError array is updated to contain the object you tried to add. If you try to update or delete an object that is not present in the contact store, the save request does not perform the update or deletion, the
CNError error occurs, and the
CNError array is updated to contain the object you tried to update or delete. Do not access objects in the save request while that request is executing.