ContactsInterfaceProtocol
public protocol ContactsInterfaceProtocol
Define metohods required to interact with Contacts framework.
Seealso
ContactsInterface
Seealso
ContactsHandler
-
This closure passes information about a complete asynchronous task.
Depending on the outcome the error may be available, and the success flag changes its value.
Declaration
Swift
typealias CompletionBlock = (Bool, Error?) -> Void -
Adds all contacts to the
CNContactStore.Declaration
Swift
func addAll(_ contacts: [CNMutableContact], completion: @escaping CompletionBlock)Parameters
contactsList of contacts.
completionCompletion closure called after contacts were saved to the store.
-
Remove all contacts from the
CNContactStore.Declaration
Swift
func removeAll(completion: @escaping CompletionBlock)Parameters
completionCompletion closure called after contacts were removed from the store.
-
Request access to the
Contactsframework.Declaration
Swift
func requestAccess(completion: @escaping CompletionBlock)Parameters
completionCompletion closure.
ContactsInterfaceProtocol Protocol Reference