iphone - 新手卡住 : ASIHTTPRequest - no known class method for selector 'requestWithURL'

标签 iphone ios asihttprequest

我正在引用 ASIHTTPRequest 并让它在 iOS5 中编译。

但是当我尝试使用它时:

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];

我得到了错误

no known class method for selector 'requestWithURL'.

setCacheStoragePolicystartAsynchronous 也会抛出错误。

事实上,我在 ASIHTTPRequest.m 文件中看不到该方法。我错过了什么? 这是从 github 下载的最新代码。

谢谢, 约翰。

最佳答案

转到目标并检查 ASIHTTPRequest.m 是否是编译器源代码的一部分。

创建一个干净的构建并尝试再构建一次。我

如果不起作用,请尝试更新您的代码。我可以在 github 代码中看到这些方法。

关于iphone - 新手卡住 : ASIHTTPRequest - no known class method for selector 'requestWithURL' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8844668/

相关文章:

iphone - 启用 iPhone 界面方向

ios - 在 Swift 中向 TableView 添加自定义项

iphone - ASIHTTPRequest 将响应数据转换为 NSArray

ios - 使用 AFNetWorking 发送请求时遇到问题

iphone - 将简单的 Obj-C 转换为 Python

iphone - 在运行时检查 "Release Build"

iphone - cocos2d :Convert iPhone App to Universal App

ios - 如何创建一个谓词,其中 % 在 ios 中作为字符串工作

ios - 保留周期与核心数据

iphone - NSOperationQueue 和 ASIHTTPRequest