问题描述
我正在引用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'.
setCacheStoragePolicy
和startAsynchronous
也会引发错误.
实际上,我在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'的未知类方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!