Uygulamamda, herhangi bir geçici çözüm/düzeltme bulamadığım bir hata oluştu. Bir sebepten dolayı, bir sosyal profille (Facebook, Twitter, vb.) Birleştirilmemiş bir kişiye bir adres kaydedebiliyorum. Ancak, ben bir garip kurtarmak hatası alıyorum Facebook ya da Twitter ile birleşmiştir bağlantımdan için bir adres eklemeye çalıştığınızda:İletişim Adresini Birleşik İletişim sonuçlarına kaydetme (CNErrorDomain error 500)
İşteThe operation couldn’t be completed. (CNErrorDomain error 500.)
ben kullanıyorum bu kodu bir kısmı:
if mutableContact.isKeyAvailable(CNContactPostalAddressesKey) {
var postalAddresses = [CNLabeledValue<CNPostalAddress>]()
for address in self.contactAddresses {
let postalAddress: CNLabeledValue<CNPostalAddress> = CNLabeledValue(label: CNLabelOther, value: address)
postalAddresses.append(postalAddress)
}
mutableContact.postalAddresses = postalAddresses
}
let saveRequest = CNSaveRequest()
if isNewContact {
saveRequest.add(mutableContact, toContainerWithIdentifier: nil)
} else {
saveRequest.update(mutableContact)
}
do {
try contactStore.execute(saveRequest)
} catch let error as NSError {
print(error.localizedDescription)
let alertController = UIAlertController(title: "Failed to save/update contact!", message: "Unfortunatly, the app couldn't add or make modifications to your contact. Please try again or use the Contacts app to preform changes.", preferredStyle: .alert)
let cancelAction = UIAlertAction(title: "Okay", style: .cancel) {
action in
self.dismiss(animated: true, completion: nil)
}
alertController.addAction(cancelAction)
self.present(alertController, animated: true, completion: nil)
}
Bu sorunu giderdiniz mi? – Rendel
@Rendel henüz Apple'dan bir yanıt almadı – Harish