add(_:error:)
Adds an ABPerson or ABGroup record to the Address Book database.
Declaration
func add(_ record: ABRecord!, error: ()) throwsParameters
- record:
The record to add.
- error:
A pointer to an error object that is set to an
NSErrorinstance if an error occurs.
Discussion
If the record argument is nil, this method raises an exception. Your changes are not committed until you call the save() method.
It is more efficient to use the ABRecord method init(addressBook:) when possible.