我是 IOS 上的菜鸟,我正在尝试将所有联系人从 iphone(模拟器)传递到一张桌子。我已经按照一些教程进行操作,但出现错误。
你能帮我解决这个问题吗?
我试过了:
#import <AddressBookUI/AddressBookUI.h>
.
.
.
ABAddressBookRef addressBook = ABAddressBookCreate( );
CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople( addressBook );
CFIndex nPeople = ABAddressBookGetPersonCount( addressBook );
for ( int i = 0; i < nPeople; i++ )
{
ABRecordRef ref = CFArrayGetValueAtIndex( allPeople, i );
NSLog(@"%@",ref);
}
我得到这个错误:
Undefined symbols for architecture i386:
"_ABAddressBookCreate", referenced from:
-[younifyTableViewController viewDidLoad] in younifyTableViewController.o
"_ABAddressBookCopyArrayOfAllPeople", referenced from:
-[younifyTableViewController viewDidLoad] in younifyTableViewController.o
"_ABAddressBookGetPersonCount", referenced from:
-[younifyTableViewController viewDidLoad] in younifyTableViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)