newbie stuck: ASIHTTPRequest - no known class meth

2019-08-08 17:09发布

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

However when I try to use it:

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];

I get the error

no known class method for selector 'requestWithURL'.

Also setCacheStoragePolicy and startAsynchronous throw errors.

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

Thanks, John.

2条回答
走好不送
2楼-- · 2019-08-08 17:47

Go to target and check ASIHTTPRequest.m is a part of compiler source or not.

Make a clean build and try to build one more time. I

f that don’t work, try to update your code. I can see those method in github code.

查看更多
够拽才男人
3楼-- · 2019-08-08 17:54

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

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

查看更多
登录 后发表回答