Questions tagged [afhttprequestoperation]
84 questions
15
votes
2 answers
Recommendation when choosing between AFHTTPRequestOperationManager and AFHTTPSessionManager
Since the AFNetworking 2.0 the AFHTTPClient has been vanished in the favour of two managers: AFHTTPRequestOperationManager and AFHTTPSessionManager. The migration guide says pretty much nothing about the cases when each of them is preferable to use.…

Oleksandr
- 1,001
- 1
- 11
- 14
7
votes
2 answers
AFNetworking error 53 during attempted background fetch
While updating my application to support Background App Refresh I ran into problem with AFNetworking.
I am getting NSPOSIXErrorDomain Code=53 "Software caused connection abort". The problem seems to occur in iOS 12, where the background connection…

Peter G.
- 7,816
- 20
- 80
- 154
7
votes
2 answers
Why cancelled AFHTTPRequestOperation sometimes hit the success block?
I'm integrating autocomplete on a search bar through Google Places API. And for the networking requests, I use AFNetworking.
I want to have only one request running at a time. So everytime I type a new letter, I do the following:
1 - Cancel the…

Aurelien Porte
- 2,692
- 27
- 32
5
votes
2 answers
Timeout POSTING to S3 from iOS using signed URLS
My server is generating info for a signed upload to S3. When I pass that info on to iOS, it works for small files. Sometimes it works for bigger ones as well, but it often times out. I am currently testing on iOS 7 over WIFI. It's typical for it to…

Bjorn Roche
- 11,279
- 6
- 36
- 58
4
votes
1 answer
Swift errors: 'manager()' is unavailable: use object construction 'AFHTTPRequestOperationManager()'
I have this swift code that I think should work but it can't handle objective c static fields. I have tried to add "()" multiple places but nothing works.
func AFHTTPRequestOperationManagerDispatchOnMainQueue(mainQueue: Bool) ->…

Morten Holmgaard
- 7,484
- 8
- 63
- 85
4
votes
1 answer
AFNetworking 2.0: credentials not sent to authentication within 30 seconds of previous request
I am using AFHTTPRequestOperationManager to get some data from our server. The server uses Basic authentication.
When the user logs into our app I set the credentials like this:
manager.credential = [NSURLCredential credentialWithUser:username…

pajevic
- 4,607
- 4
- 39
- 73
4
votes
1 answer
AFNetworking - Upload video along with other parameters
I want to upload video to web service along with some other parameters. I want to upload userID, videoID and video to web service. While uploading, all the parameters other than video is being sent to web service. I've checked at web service end,…

EmptyStack
- 51,274
- 23
- 147
- 178
3
votes
1 answer
How to pass an Authorization token for AFNetworking 2.0 as it is deprecated
I'm Currently working on a project where I'm using AFNetworking 2.0 library to GET and POST the data to and from server.In some cases i wanted to pass a token value as header type for the request with AFHTTPRequestOperationManager. So far this is…

Madhu
- 869
- 1
- 17
- 37
3
votes
1 answer
JSON NSDictionary disordered after AFJSONResponseSerializer
I have the following code to download a JSON file from my server:
- (void) queryAPI:(NSString*)query withCompletion:(void (^) (id json))block{
NSURL *URL = [NSURL URLWithString:@"http://myAPI.example/myAPIJSONdata"];
NSURLRequest *request =…

javsmo
- 1,337
- 1
- 14
- 23
3
votes
1 answer
HTTP Request using AFHTTPRequestOperationManager
Hi I'm new with AFNetworking 2.0 and I need to connect in my php file using AFHTTPRequestOperationManager but if I get the response it's only returning null.
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
…

RonPelayo
- 376
- 5
- 22
3
votes
1 answer
iOS AFNetworking downloadProgressBlock calculation returning negative numbers
I am using AFNetworking to download data that is parsed with a third party class. I have used AFNetworking to do similar actions many times before but for some reason, when I call the downloadProgressBlock and do the calcuation to use with my…

Jon Erickson
- 1,876
- 4
- 30
- 73
2
votes
1 answer
In <= iOS 8 is OK. But iOS 9, i get error
I get error:
Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x15d275b0 {Error Domain=kCFErrorDomainCFNetwork…

user1438709
- 79
- 2
- 7
2
votes
1 answer
EXC_BAD_ACCESS for AFHTTPRequestOperationManager
First calling for "post method" its working fine using AFHTTPRequestOperationManager. But second time i called get method for same AFHTTPRequestOperationManager got EXC_BAD_ACCESS. Please check my below source and help how to resolve.
FIRST…

2vision2
- 4,933
- 16
- 83
- 164
2
votes
1 answer
some objc_release crash. What can be a cause?
I can't reproduce some bug that happens sometimes. This is a report:
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0:
0 libobjc.A.dylib 0x3b4b97fa…

adsurbum
- 3,107
- 3
- 22
- 27
2
votes
1 answer
Queue of AFHTTPRequestOperations creating Memory Buildup
I just updated to AFNetworking 2.0 and I am re-writing my code to download data & insert it into Core Data.
I download JSON data files (anywhere from 10-200mb files), write them to disk, then pass them off to background threads to process the data.…

RyanG
- 4,393
- 2
- 39
- 64