HOW TO GET PERSON ID USING ABADDRESSBOOK IN IOS

Tom Cruser

Total Post:28

Points:196
Posted by  Tom Cruser
 612  View(s)
Ratings:
Rate this:
I have successfully fetched all the contacts with the help of ABAddressBook in our application.
But now my need is to get unique identify of each contact person.
I am using ABRecordGetRecordID, but I am doing somthing wrong.

So, anyone who have my problems solution, then please reply me.
thanks in advance!
  1. Steven Hill

    Post:10

    Points:72
    Re: How to get person id using ABAddressBook in iOS

    To get each person Id I am using code like this:

    ABRecordRef contactPerson = (__bridge ABRecordRef)allContacts[i];
    NSNumber *contactId = [NSNumber numberWithInt: ABRecordGetRecordID(contactPerson)];

    In this code I am fetching ID into NSNumber format, you can use another format.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!