问题
I'm faccing an issue at time of adding contacts throught Contact Framework.
I used device iPhone 5s with iOS 12.1.2
My Code for adding contact is as below ::
let saveRequest = CNSaveRequest()
saveRequest.add(self, toContainerWithIdentifier: nil)
do {
try contactStore.execute(saveRequest)
} catch let error {
print("Error occurred while saving the request \(error)")
}
This everytime thows error as below ::
Error occurred while saving the request Error Domain=CNErrorDomain Code=1 "Communication Error" UserInfo={NSLocalizedDescription=Communication Error, NSLocalizedFailureReason=An error occurred while trying to communicate with the Contacts service.}
Dose any one now anything about this error?
I'm not able to found any thing about this.
来源:https://stackoverflow.com/questions/54326775/cncontact-add-new-contact-issue