tags:

views:

151

answers:

2

Trying to create a object for ABPersonRef example: ABpersonRef ref;

have included Addressbook and AddressBookUI framework even then when i compile it states 'ABPersonRef' Undeclared Identifier

+1  A: 

You will also need to link against AddressBook framework and

#import <AddressBook/AddressBook.h>
St3fan
i have included both the headers
Pinky
But have you included both *framreworks* too?
St3fan
A: 

Have you added imports to your source file?

#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>

Edit: I've read your question more carefully. There's no ABPersonRef type (at least public) in iPhone SDK. You should work with ABRecordRef type which is generic for both person and group records - as you can see all AB*** methods work with ABRecordRef type.

Vladimir
have included both the headers
Pinky
for making use of ABPersonCopyVCardRepresentation need to create a object for ABPersonRef but it is getting linked to the workspace
Pinky
wanted to make use of ABPerson i have included both the AddressBook headers
Pinky
it seems ABPersonCopyVCardRepresentation is also not a part of iPhone SDK, it is available on MacOS only (as well as ABPersonRef)
Vladimir
thanks vladimir i too just realized that thank you
Pinky
can u tell me how to create a vcard in iphone programatically
Pinky