Reputation: 1839
I am trying to get the ABRecordID of a record, but it always returns -1. Here is my code:
NSNumber *recordId = [NSNumber numberWithInteger:ABRecordGetRecordID(person)];
I can retrieve other informations without any problems :/ Any solutions?
Upvotes: 3
Views: 985
Reputation: 19641
You need to request authorization (ABAddressBookRequestAccessWithCompletion
) to be able to get a record identifier. Otherwise you just get an ABPersonRef
with a copy of the data.
Upvotes: 5