I want to get a list of all contacts of an iPhone.
I checked Address Book
reference, I may missed something but I didn't see it provides a method to get a list of contacts.
I want to get a list of all contacts of an iPhone.
I checked Address Book
reference, I may missed something but I didn't see it provides a method to get a list of contacts.
Use this code to display all names + lastnames + phonenumbers (iOS 6). Works on simulator too:
Perhaps
ABPerson
function ABAddressBookCopyArrayOfAllPeople might do?Example:
Check out https://github.com/heardrwt/RHAddressBook (254 stars 01/2014).
Provides an ObjC wrapper for AddressBook with much simpler API.
Make sure you have the proper import
Then you can get a CFArray object with all contacts using
This works for ios 7 and ios 8 , i hope its help you.............
if you want to sort as a alphabetical, you can use below code.