Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS CNContactStore executeSaveRequest fails with CNErrorDomain Code=500

When attempting to save a contact that has populated Social Profile data the following error is encountered: This is seen in iOS 9.2

Domain=CNErrorDomain,Code=500 "(null)" UserInfo={CNKeyPaths=(SocialProfiles), NSUnderlyingError=0x1612681f0{Error Domain=ABAddressBookErrorDomain Code=0 "(null)"}}

I am serializing a contact that already exists in a different phone's address book and when I look at the attributes for the Facebook social Profile Inotice that the UserIdentity attribute is nil (null).

I'm not sure if I am just missing some knowledge on how this works and this is expected behavior, a usage problem or is it a defect?

like image 380
williamrct Avatar asked Jan 05 '16 00:01

williamrct


1 Answers

Solved. The issue was that the default contact account was an exchange account. The socialProfile save is not allowed in this type of container. Solution is to remove the unsupported property and attempt the save again.

like image 125
williamrct Avatar answered Sep 28 '22 05:09

williamrct