zoukankan      html  css  js  c++  java
  • AFNetworking报错"_UTTypeCopyPreferredTagWithClass", referenced from: _AFContentTypeForPathExtens

    问题: 在和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。添加成功后运行程序成功。

  • 相关阅读:
    P1383 高级打字机
    P1383 高级打字机
    P3723 [AH2017/HNOI2017]礼物 [FFT]
    P3723 [AH2017/HNOI2017]礼物 [FFT]
    P3338 [ZJOI2014]力 [FFT]
    P3338 [ZJOI2014]力 [FFT]
    P2597 [ZJOI2012]灾难
    c语言推箱子 扫雷项目
    蓝桥杯c语言基础题
    c语言的图形库
  • 原文地址:https://www.cnblogs.com/jukaiit/p/6207763.html
Copyright © 2011-2022 走看看