好吧,我也写点什么东西
1.0 当我将科大讯飞的lib和需要的lib集成到自己的项目时,出现了一个很奇葩的问题
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CNContactStore", referenced from:
objc-class-ref in iflyMSC(IFlyContact.o)
"_OBJC_CLASS_$_CNContactFetchRequest", referenced from:
objc-class-ref in iflyMSC(IFlyContact.o)
"_CNContactFamilyNameKey", referenced from:
-[IFlyContact fetchContactWithContactStore:] in iflyMSC(IFlyContact.o)
"_ABAddressBookCreateWithOptions", referenced from:
-[IFlyContact contact] in iflyMSC(IFlyContact.o)
"_ABAddressBookRequestAccessWithCompletion", referenced from:
-[IFlyContact contact] in iflyMSC(IFlyContact.o)
"_kABPersonFirstNameProperty", referenced from:
-[IFlyContact contact] in iflyMSC(IFlyContact.o)
"_CNContactGivenNameKey", referenced from:
-[IFlyContact fetchContactWithContactStore:] in iflyMSC(IFlyContact.o)
"_ABRecordCopyValue", referenced from:
-[IFlyContact contact] in iflyMSC(IFlyContact.o)
"_ABAddressBookCopyArrayOfAllPeople", referenced from:
-[IFlyContact contact] in iflyMSC(IFlyContact.o)
"_kABPersonLastNameProperty", referenced from:
-[IFlyContact contact] in iflyMSC(IFlyContact.o)
"_ABAddressBookCreate", referenced from:
-[IFlyContact contact] in iflyMSC(IFlyContact.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
如下图:

这个问题很奇葩,问什么呢,因为我第一次写Demo的时候,压根就没有啊!!!!
解决办法,百度N种依然无效,其实简单的想哭,因为缺少lib
AddressBookUI.framework
AddressBookUI.framework
Contacts.framework
ContactsUI.framework
如下图:

然后OK了。。。。,但是错误中命名缺少好几个lib啊。。。。蛋疼。。。。
网友评论