My app loops over all of my contacts in my Mac OS (10.9.1) address book (contacts.app) and wants to update some property. But with some records I can't do that - because the record is read-only (for example Error Domain=ABAddressBookErrorDomain Code=1012 "Record is read-only" UserInfo=0x8c8a480 {NSLocalizedDescription=Record is read-only, property=Address}). I surfed the net to figure out why, and if there is something I can do about that - to no avail. Any pointers?
Asked
Active
Viewed 156 times
1 Answers
-1
I am unsure as to why they are readonly, but I do know how to check if they are readonly. Using the ABRecordIsReadonly
function (which takes a record as its only parameter), you are returned with a bool
representing if it is readonly or if it is not.
I would definitely be interested in knowing what causes a record to be readonly. On iOS, I have not come across anything like that. This seems to only be a Cocoa thing.
Edit: One reason this may exist is for Outlook contacts, because if you edit them outside of Outlook or delete them, they go back to how they are. This is just a guess, however

erdekhayser
- 6,537
- 2
- 37
- 69