开发者

How to share contacts?

开发者 https://www.devze.com 2022-12-15 05:12 出处:网络
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 开发者_JS百科doing?

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 开发者_JS百科doing?

Regards, Prathap.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消