首页 > Web开发 > 详细

AFNetworking报错"_UTTypeCopyPreferredTagWithClass", referenced from: _AFContentTypeForPathExtens

时间:2016-12-21 16:01:43      阅读:427      评论:0      收藏:0      [点我收藏+]

问题: 在和Unity交互的过程中,从Unity开发工具打包出来的项目文件,在添加AFNetworking库,运行时报出以下错误:

Undefined symbols for architecture armv7:

  "_kUTTagClassMIMEType", referenced from:

      -[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

  "_kUTTagClassFilenameExtension", referenced from:

      -[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

  "_UTTypeCreatePreferredIdentifierForTag", referenced from:

      -[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

  "_UTTypeCopyPreferredTagWithClass", referenced from:

      -[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

技术分享

 

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

解决:Build Phase ->Link Binary With Libraries()下添加 MobileCoreServices.framework。添加成功后运行程序成功。

技术分享

 

AFNetworking报错"_UTTypeCopyPreferredTagWithClass", referenced from: _AFContentTypeForPathExtens

原文:http://www.cnblogs.com/jukaiit/p/6207763.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!