为什么我的 ASIHTTPRequest 文件显示 ARC 错误? [英] Why are my ASIHTTPRequest files showing ARC errors?

查看:24
本文介绍了为什么我的 ASIHTTPRequest 文件显示 ARC 错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了我所有的 ASIHTTPRequest 文件,但不幸的是出现了以下错误:

I have implemented all of my ASIHTTPRequest files, but unfortunately the following errors occur:

为什么会这样?

推荐答案

ASIHTTPRequest 不支持 ARC,因此如果在启用 ARC 的项目中使用它,预计会出现错误.

ASIHTTPRequest doesn't support ARC, so it is expected you get errors if you use it in an project with ARC enabled.

关于如何仅针对此处建议的 asihttprequest 文件禁用 ARC 的解决方案有多种:

There are various solutions on how to disable ARC just for the asihttprequest files suggested here:

https://github.com/pokeb/asi-http-request/issues/210

最简单的方法是为 ASIHTTPRequest 源文件禁用 ARC,请参见此处:如何为项目中的单个文件禁用 ARC?

The easiest one is just to disable ARC for the ASIHTTPRequest source files, see here : How can I disable ARC for a single file in a project?

有人开始了他们所谓的 ARC 兼容 HTTPRequest——基本上是一个非常小的 NSURLConnection 包装器,它具有与 ASIHTTPRequest 类似的接口:

Someone has started what they called an ARC compliant HTTPRequest - basically a very small wrapper around NSURLConnection that has a similar interface to ASIHTTPRequest:

https://github.com/imathome/ARCHTTPRequest

虽然它不支持完整 ASIHTTPRequest 的所有/大部分功能.

It doesn't support all/most of the features of the full ASIHTTPRequest though.

最后,很多人开始转而使用 AFNetworking.较新的版本都使用 ARC,尽管推荐的使用方式是通过 CocoaPods ARC 编译器标志将自动正确排序:

Finally, a lot of people are moving to use AFNetworking instead. The more recent versions all use ARC, although as the recommended way to use it is via CocoaPods the ARC compiler flags will be sorted out correctly automatically:

https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking

这篇关于为什么我的 ASIHTTPRequest 文件显示 ARC 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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