views:

72

answers:

2

Hi All,

By using IPhone SDK (on a jail broken iPhone), how can I share a contact (.vcf file) through mail as same as the address book is doing?

Regards, Prathap.

A: 

Have you looked at the Address Book Framework reference? It allows you to fetch records from the Address Book database. You may have to put this data in vCard format yourself, I don't know if the framework provides this functionality for you.

mkrause
Yes, there is no support in the Public API. But as far as I know we can do this by "ABPerson C" reference in MAC. But I'm not sure whether we can do the same in IPhone.
prathumca
A: 

Yes, you can do this on the iPhone:

ABAddressBookRef addressBook = CFAutorelease(ABAddressBookCreate());
NSArray* contacts = (NSArray*)ABAddressBookCopyArrayOfAllPeople(addressBook);

Erica Sadun's ABContactHelper classes come in mighty handy if you want to mess around with the Address Book interface.

Felixyz