Friday, March 14, 2008

How to: Get contacts with the iPhone SDK



This source code was developed by Pablo Abad and shows the contacts stored in the iPhone Address Book. The contacts will show in the Xcode console.

Thanks Pablo, and good luck in Munich.

8 comments:

ankur said...

Hi,
I am able to read the contacts in iPhone simulator contacts using you code.But when i add new contact in iPhone simulator then this code not give new contact which i add..
Please tell me the what's problem...
Thank you..

Sourav said...

Add the line after

ABRecordRef person = ABAddressBookGetPersonWithRecordID(ab,(ABRecordID) i);


if(parson ==null){
len++;
continue;
}

its Working Fine....

Pedro Fraca said...

Thanks for your suggestion.

Frédéric Jacobs said...

Does anyone knows how to export iPhone's AdressBook into a SQLite Database ?
If anyone has a sample code...

Thanks

Hakan OZMEN said...

i want to read contacts of iphone in c# .Net windows application? (not ios) anybody can help me?

Hakan OZMEN said...

i want to read iphone contacts in c# windows application (not ios)
like as iTools.
can anyone help me?

NARESH JAIN said...

Hi..
I Am New To IOS..
Can I Have Complete Code Of It??

Thanks

NARESH JAIN said...

Hi
I Am New To iOS..
Can I Have Cmplete Code Of This.

myView.h N All Files

Thanks Waiting For Reply
Naresh Jain