Nissaba
Nissaba

Reputation: 973

looking for pointer and clarification on ABAdressbook

I am trying to add ABAdressbook support to my IOS5 app. Been looking the documentation. I get this code where we create a ABAdressbook instance using:

ABAddressBook *addressBook;
ABPerson *newPerson;
addressBook = [ABAddressBook sharedAddressBook];

(This is from the apple documentation.)

I added the headers and the framework accordingly. But the compiler (xcode) does not recognise ABAdressbook. This left me to wonder if this code is only good on the OSX API and not valid under IOS?

So far the working code I get always goes by creating an ABAddressBookRef using :

ABAddressBookRef addressBook = ABAddressBookCreate();

I have not found much good documentation for IOS Addressbook programming and the apple documentation is quite obscure when it come to working with groups.

So I am looking for a bit of help and a few good pointers.

Upvotes: 0

Views: 186

Answers (1)

Raon
Raon

Reputation: 1286

Create the ABAddressBook like this ABAddressBookCreate() no longer exists.

ABAddressBookRef addressBook =ABAddressBookCreateWithOptions(NULL,NULL);

Upvotes: 1

Related Questions