afnetworking get请求代码报错?

AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    [manager GET:@"http://localhost:5000/index" parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject) {
        NSLog(@"JSON: %@", responseObject);
    } failure:^(NSURLSessionTask *operation, NSError *error) {
        NSLog(@"Error: %@", error)p;
    }];
    
    

报错

Incompatible block pointer types sending 'void (^)(NSURLSessionTask __strong, NSError __strong)' to parameter of type 'void (^ __nullable)(NSURLSessionDataTask * __nonnull __strong)'

没有懂是什么问题,求大神解答。

我用Xcode 6,官方文档说AFNetworking 3.0+需要xcode 7,是否跟这个有关系?

查看回复