No visible @interface for 'AFHTTPSessionManager' declares the selector 'POST:parameters:progress:success:failure:'
The method you are looking for is POST:parameters:success:failure:
. So simply remove the progress:nil
from the method call. The whole method call would be look like below.
[manager POST:BASEURL parameters:dict success:^(NSURLSessionTask *task, id responseObject) {
[hud hideAnimated:YES];
// Login response validation
if (responseObject == [NSNull null]) {
[self showMessage:@"Login Failed" Message:@"Unable to login. Please try again!"];
}else {
//NSError *error = nil;
NSLog(@"response type : %@", NSStringFromClass([responseObject class]));
//NSDictionary *response = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:&error];
[self checkResultValue:(NSDictionary *)responseObject];
}
} failure:^(NSURLSessionTask *task, NSError *error) {
NSLog(@"AFHTTPSession Failure : %@", [error localizedDescription]);
}];
In AFNetworking 4.0
POST:
[manager POST:baseUrl parameters:params headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
}];
GET:
[manager GET:baseUrl parameters:nil headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"getDeviceScanResults: failure: %@", error.localizedDescription);
}];