Runtime error CNContactStore executeSaveRequest with an error (CSIndexErrorDomain Code = -1005)

I get CSIndexErrorDomain Code = -1005 when I try to execute SaveRequest in Xcode 7.1 iPad 2 Simulator with the following code:

let saveRequest = CNSaveRequest() saveRequest.addContact(newContact, toContainerWithIdentifier: nil) if let group = self.group { saveRequest.addMember(newContact, toGroup: group) } try store.executeSaveRequest(saveRequest) 

I read that this is a CoreSpotlight bug and that CoreSpotlight is not available on the iPad, so why is the iOS 9 Contacts framework trying to launch CoreSpotlight API calls?

How can I avoid this error when saving a contact in iOS 9, or how can I catch it, in particular, unlike sharing?

+5
source share

Source: https://habr.com/ru/post/1235041/


All Articles