ios - Saving Contact Address to Unified Contact results in (CNErrorDomain error 500) -


there odd error in application can't find workarounds/fixes for. reason, i'm able save address contact isn't unified social profile (facebook, twitter, etc). however, when try add address contact unified facebook or twitter weird save error:

the operation couldn’t completed. (cnerrordomain error 500.) 

here of code i'm using:

    if mutablecontact.iskeyavailable(cncontactpostaladdresseskey) {         var postaladdresses = [cnlabeledvalue<cnpostaladdress>]()          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)     }      {         try contactstore.execute(saverequest)     } catch let error nserror {         print(error.localizeddescription)         let alertcontroller = uialertcontroller(title: "failed save/update contact!", message: "unfortunatly, app couldn't add or make modifications contact. please try again or use contacts app 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)     } 

ok, have gotten response apple , behavior intended. developers should detect policy violation , offer create new contact , link 2 contacts.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -