2012-11-02 83 views
0

我是AFNetworking的一名新手,并运行一个简单的应用程序来了解AFNetworking如何工作。我正在关注this tutorial on MobileTuts:使用AFNetworking的编译器警告

我已经包含了AFNetworking库,并且还为每个AFNetworking文件在编译源中键入了-fno-objc-arc。

我包括这部分到实现文件:

NSURL *url = [[NSURL alloc] initWithString:@"http://itunes.apple.com/search?term=harry&country=us&entity=movie"]; 
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; 
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { 
    NSLog(@"JSON"); 
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) { 
    NSLog(@"Request Failed with Error: %@, %@", error, error.userInfo); 
}]; 
[operation start]; 

当我击跑,我有14个语义问题,并在项目不合格。 例如一个错误是:

Method possibly missing a [super dealloc] call. 

不知道如何解决这个错误。需要一些指导...

+0

请发布完整的错误信息。 –

回答

2

试试这个

首先deleteAFNetworkinglibrary和清洁工程。

现在downloadlatest AFNetworking

Add再次AFNetworkinglibrarybuild项目。

+0

我删除了所有文件的-fno-objc-arc ...但现在我有词法或预处理器的问题...包括核心服务和系统配置框架及其头文件在pch文件中... – lakesh

+0

add -fno-objc -arc所有文件 –

+0

词法或预处理器问题依然存在.... – lakesh