新手卡住:ASIHTTPRequest-选择器'requestWithURL'的未知类方法 [英] newbie stuck: ASIHTTPRequest - no known class method for selector 'requestWithURL'

查看:66
本文介绍了新手卡住:ASIHTTPRequest-选择器'requestWithURL'的未知类方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在引用ASIHTTPRequest,并使其在iOS5中进行编译.

I am referencing ASIHTTPRequest and got it to compile in iOS5.

但是,当我尝试使用它时:

However when I try to use it:

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];

我收到错误

no known class method for selector 'requestWithURL'.

setCacheStoragePolicystartAsynchronous也会引发错误.

实际上,我在ASIHTTPRequest.m文件中看不到该方法.我想念什么? 这是从github下载的最新代码.

Indeed I can't see that method in the ASIHTTPRequest.m file. What am I missing? This is the latest code download from github.

谢谢, 约翰.

推荐答案

确保已将CFNetwork.framework,SystemConfiguration.framework,MobileCoreServices.framework,CoreGraphics.framework和libz.dylib添加到项目中.

Make sure you have CFNetwork.framework, SystemConfiguration.framework, MobileCoreServices.framework, CoreGraphics.framework and libz.dylib added into your project.

kReachabilityChangedNotification在Reachability.h中声明(位于ASIHTTPRequest程序包中名为"External"的文件夹中),因此请确保添加Reachability.h&从外部"文件夹中的Reachability.m进入您的项目

kReachabilityChangedNotification is declared in Reachability.h(which is located in a folder called "External" in the ASIHTTPRequest package), so make sure to add Reachability.h & Reachability.m from the "External" folder into your project

这篇关于新手卡住:ASIHTTPRequest-选择器'requestWithURL'的未知类方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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