Questions tagged [afhttpclient]
44 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
1 answer
AFNetworking: Using IP address, application cannot reach server
When I try to use an ip address instead of a hostname to tell an ios application in a simulator to talk to a local server the app hangs on the loading screen, waiting for a response from the server that never comes.
I'm new with Objective C but the…

wanyo
- 113
- 8
5
votes
1 answer
Alternative for enqueueHTTPRequestOperation in AFNetworking 2.0
We need to download files concurrently in our application.
In earlier version of AFNetworking we have downloaded 2 files concurrently by using the code below:
(AFHTTPClient)
[_httpClient.operationQueue…

Konda
- 123
- 1
- 10
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
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
2 answers
AFNetworking getting data for XML parse error
This is my AFHTTPClient singleton:
+ (API *)sharedInstance
{
static API *sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[API alloc] initWithBaseURL:[NSURL URLWithString:kAPIHost]];
…

zhuber
- 5,364
- 3
- 30
- 63
2
votes
0 answers
iOS app build fail on App Center: Error: /usr/bin/xcodebuild failed with return code: 65
My app is failing to build on App Center with the following errors:
/Users/runner/work/1/s/xxx/Lib/Api/ApiClient.swift:137:67: error: missing argument for parameter 'headers' in call
parameters:…

Joe_Coder
- 31
- 7
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
How to setup app to trust only one ssl certificate
I have an iPhone app , that needs to make secure connection to my webservice
I have a CA which i created and want to add to the app, so that it creates the connection and authenticates my server
I am using restkit 0.20.3 to make the requests.
How do…

Lena Bru
- 13,521
- 11
- 61
- 126
2
votes
1 answer
How to migrate AFHTTPClient, Afnetworking 1.0 to 2.0
My problem is that I have a old code and I dont know how to change it.
I had 1 class called API (AFHTTPClient) I have problems with 2 methods because I dont know how to put them in 2.0:
This:
-(void)commandWithParams:(NSMutableDictionary*)params…

natijauskas
- 183
- 1
- 3
- 12
2
votes
1 answer
Accepting invalid JSON in an AFJSONRequestOperation?
I am working on fixing a bug in an existing project. The trouble is that AFHTTPClient is expecting a valid JSON response, but the server is returning some gibberish like ""\" Operation complete\"" (all the quotes and brackets are in the return).…

Rob
- 23
- 3
1
vote
2 answers
Multiple AFHTTPClient Request
I've got subclass of AFHTTPClient
The main idea is that i call all API through my singleton of AFHTTPClient subclass, and all requests goes through 1 points for error handling and HUD displaying.
This is entry point for every API calls:
-(void)…

KysokZla
- 25
- 5
1
vote
2 answers
iOS Emptying Queue of Requests
When you create/update/delete a record in my app it creates an OutgoingRequest in Core Data. Periodically, the app will get these requests in a queue, and push them all to the server. I do this using a AFHTTPClient post (seen below). The issue I am…

RyanG
- 4,393
- 2
- 39
- 64
1
vote
1 answer
How Carrierwave "image can't be blank" You are not allowed to upload "\" files?
I'm getting
(lldb) po operation.responseString
{"errors":{"image":["can't be blank","You are not allowed to upload \"\" files, allowed types: jpg, jpeg, gif, png"]}}
Uploading to create a new group with an image parameter along with name &…

quantumpotato
- 9,637
- 14
- 70
- 146
1
vote
0 answers
AFNetworking and strange error -999
I have strange problem with AFNetworking framework. This problem is not common, it happens sometimes and I can not find the reason. It works 5 times in row and the next time, on the same request it returns NSUrlErrorDomain -999.
[self…

user2429398
- 35
- 3