IOS --网络请求 AFNetworking3.0导入错误 报referenced from:

最近在原来项目中用MKNetworkKit 实现网络请求,想为了使应用符合AppStore的要求,用AFNetworking3.0+来满足ipv6。导入AFNetworking 和UIKit+AFNetworking 两个文件的时候5处地方报错快哭了:

Undefined symbols for architecture x86_64:
"_UTTypeCopyPreferredTagWithClass", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
"_kUTTagClassFilenameExtension", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
"_kUTTagClassMIMEType", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
ld: symbol(s) not found for architecture x86_64

以上错误是因为:

未添加 MobileCoreServices.framework(此框架定义统一类型标识符 (UTIs)使用的底层类型)

作者:SmileFans 链接:https://www.jianshu.com/p/2df0a70c4521

标签: none