gpt4 book ai didi

iphone - 使用 AFNetworking 的编译器警告

转载 作者:行者123 更新时间:2023-11-28 22:46:06 24 4
gpt4 key购买 nike

我是 AFNetworking 的新手,运行一个简单的应用程序来了解 AFNetworking 的工作原理。我正在关注 this tutorial on MobileTuts:

我已经包含了 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.

不确定如何解决此错误。需要一些指导...

最佳答案

试试这个:

首先删除 AFNetworking library 并清理项目。

现在下载 latest AFNetworking .

再次添加 AFNetworking librarybuild 项目。

关于iphone - 使用 AFNetworking 的编译器警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13189031/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com