IOS CNContactStore executeSaveRequest crash with CNErrorDomain Code = 500

When trying to save a contact with completed social profile data, the following error occurs: this is visible in iOS 9.2

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

I serialize a contact that already exists in another phonebook, and when I look at the attributes of the social profile of the Facebook social profile, the attribute UserIdentity is nil ( null ).

I'm not sure I just don’t know how this works, and is this the expected behavior, usage problem or is it a defect?

+5
source share
1 answer

solved. The problem was that the default contact account was an exchange account. Saving socialProfile is not allowed in this type of container. The solution is to remove the unsupported property and try again to save.

0
source

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


All Articles