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

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

问题描述

我已经实现了所有ASIHTTPRequest文件,但遗憾的是发生了以下错误:

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

为什么会发生这种情况?

Why is this happening?

推荐答案

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天全站免登陆