AFNetworking库在iOS 7中失败 [英] AFNetworking Library failing in iOS 7

查看:77
本文介绍了AFNetworking库在iOS 7中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用新的iOS 7 Beta并下载最新版本的AFNetworking,我转到文件>向项目添加文件,并将其传递到目录AFNetworking.framework中。现在,我遇到了很多链接器错误。为了进行健全性检查,我将提交历史回滚到了iOS 6,并且一切都成功编译了。这是日志:

 架构i386的未定义符号:
_OBJC_CLASS _ $ _ AFHTTPClient,引用自:
CloudGlyphAPIClient.o中的_OBJC_CLASS _ $ _ CloudGlyphAPIClient $ o b CloudGlyphAPIClient.o中的_OBJC_METACLASS _ $ _ CloudGlyphAPIClient $ o

我是否需要等待AFNetworking来了解最新版本的iOS,还是这是一种体系结构



谢谢

解决方案

AFNetworking对我来说编译并加载正常在iOS 7上。最简单的解决方案是让您设置 CocoaPods ,并包括



有关说明,请参见此答案确保文件包含在目标中。 此答案将向您解释错误消息的所有内容。



iOS 7可能是红鲱鱼,但是,如果AFNetworking之前是可行的(您没有没说),如果您的库在升级时未链接,您可能要提交错误报告。 / p>

Using the new iOS 7 Beta and downloading the latest version of AFNetworking, I went to File>Add Files to Project, and passed in the directory AFNetworking.framework. Now I'm getting a slew of linker errors. For a sanity check, I rolled back the commit history to iOS 6 and everything compiled successfully. Here's the log:

    Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_AFHTTPClient", referenced from:
      _OBJC_CLASS_$_CloudGlyphAPIClient in CloudGlyphAPIClient.o
  "_OBJC_CLASS_$_AFJSONRequestOperation", referenced from:
      objc-class-ref in CloudGlyphAPIClient.o
  "_OBJC_METACLASS_$_AFHTTPClient", referenced from:
      _OBJC_METACLASS_$_CloudGlyphAPIClient in CloudGlyphAPIClient.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do I need to wait for AFNetworking to get up-to-date with the next version of iOS or is this an architecture issue?

Thanks

解决方案

AFNetworking compiles and loads fine for me on iOS 7. The easiest solution would be for you to set up CocoaPods, and include AFNetworking that way.

See this answer for instructions on making sure the file is included in your target. This answer will explain all the pieces of the error message to you.

iOS 7 is probably a red herring, but if AFNetworking was working before (you didn't say), you may want to file a bug report if your libraries got unlinked when you upgraded.

这篇关于AFNetworking库在iOS 7中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆