views:

305

answers:

3

Can I create an ABAddressBook which does not read data from my address book. i.e. it's empty to start with so that I can put in my own contacts fetched from the internet.

As you may know the function

ABAddressBookRef ab = ABAddressBookCreate(); 

gives me data from the built in addressbook. This is not what I want but if you know a solution to my problem please let me know.

A: 

I don't think it is possible to have an empty instance of ABAddressBook. The documentation is only about getting an ABAddressBook filled with the address book of the iPhone.

Laurent Etiemble
No, it's probably not possible. Too bad.
Godisemo
A: 

You could try to zero out ABAddressBookRef with a memset/calloc and see if that gives you the desired result.

David Sowsy
I'm not familiar with these functions so I don't know how you mean I should use them.
Godisemo
A: 

You could try making an array (or mutablearray) that you fill with the contacts and put the array inside a UITableView.

Jaba
This is what I'm trying to do now. Making my own peoplepicker :PI had hoped for a easier soulution but there probably is none.
Godisemo