ABRecordID for a record in addressbook(unique id for inserted record in addressbook)
Asked Answered
D

1

2

I got stuck while adding records to contacts of iphone.

Situation is this I have a view in which contacts are created and inserted to contacts of iphone.

What I want is

Is there a way to find some unique ID of the (record) contact which is inserted. Which will be required to access the contacts in some other view.

Please enlighten me on this.

Doornail answered 21/12, 2009 at 12:8 Comment(0)
P
3

When you insert a new record in the AddressBook, the record is automatically assigned an ABRecordID that you can retrieve using

ABRecordID ABRecordGetRecordID (
   ABRecordRef record
);
Presence answered 21/12, 2009 at 14:44 Comment(2)
Just wanted to add you must save the address book before trying to get the record id. Just realized this when trying to add multiple records before calling save.Emelda
Remember, if your users use MobileMe and do a sync reset, this recordid will change.Plant

© 2022 - 2024 — McMap. All rights reserved.