Questions tagged [afnetworking-3]

AFNetworking is a networking library for iOS and macOS.

AFNetworking is a networking library for iOS and macOS.

Related

261 questions
27
votes
10 answers

afnetworking 3.0 Migration: how to POST with headers and HTTP Body

I am trying to make a POST request which has HTTPHeader Fields and a HTTP body to the youtube API. Previously in version 2.0 of AFNetworking, I used to do it this way which worked: NSDictionary *parameters = @{@"snippet":…
25
votes
6 answers

get responseObject on failure block AFNetworking 3.0

how can I get the response string from failure block in AFNetworking 3.x, In the 2.x version the way to do it was: [manager GET:path parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { NSDictionary…
Alexy Ibrahim
  • 534
  • 1
  • 7
  • 20
9
votes
3 answers

AFNetworking 3.0 setImageWithURLRequest download progress

Does anyone have a nice working solution for getting the download progress when using the UIImageView+AFNetworking category and AFNetworking 3.0. This category, which I did use for versions up till 3.0 has stopped working now. Here is my own…
knutigro
  • 1,014
  • 1
  • 9
  • 19
9
votes
5 answers

How to do GET request via AFNetworking?

I added directories AFNetworking and UIKit+AFNetworking to project manager. I use latest library 3.0.4 After I imported file AFNetworking.h in my class file .m. I found a lot examples how to make request to url, but information is old. How to make…
user2565968
8
votes
0 answers

Why AFURLRequestSerialization use KVO to observe value changing?

After reading the source code of AFURLRequestSerialization, I found that the author uses AFHTTPRequestSerializerObservedKeyPaths and NSStringFromSelector to get multiple keys such as allowsCellularAccess and cachePolicy, and uses itself as the…
yudun1989
  • 1,016
  • 9
  • 22
7
votes
4 answers

Cancel All Operations + AFNetworking 3.0

I have created a class HTTPServiceProvider inherited from AFURLSessionManager. Added below code to get the data. let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() let manager = AFURLSessionManager(sessionConfiguration:…
ranjit.x.singh
  • 257
  • 3
  • 9
7
votes
3 answers

AFNetworking 3 x-www-form-urlencoded post data

I'm trying to post data with x-www-form-urlencoded body. Posting via postman, it is ok But i cant do it via afnetworking 3. Here is my code NSDictionary *parameters = @{@"login" : email, @"password":…
Vitalyz123
  • 189
  • 2
  • 10
5
votes
0 answers

Wrong NSNumber double value for iOS 11 using AFNetwotking

I want to send an NSNumber created with a float with only two fraction digits. So I'm creating a NSNumberFormatter with 2 Fraction Digits, but it doesn't respect the number of Fraction Digits. NSNumberFormatter *formatter = [[NSNumberFormatter…
xarly
  • 1,810
  • 3
  • 21
  • 38
5
votes
2 answers

How to show progress bar with afnetworking 3.0 in ios?

I want to upload pending data to a server and then download all data from the server database at the same button click. But I'm not getting how to show progress bar showing the progress of uploading/downloading.I tried using…
Deepmala singh M
  • 369
  • 1
  • 15
5
votes
2 answers

AFNetworking 3.0 The data couldn’t be read because it isn’t in the correct format

There are other questions with similar titles but none of them helped me. I've to send a PUT request to server in order to change the status of appointment so I've made this method -(void)appointmentStatusChangedTo:(NSString *)statusID…
Chaudhry Talha
  • 4,570
  • 7
  • 30
  • 71
5
votes
0 answers

Unable to satisfy the following requirements, AFNetworking dependency were found, but they required a higher minimum deployment target

I am using cocoapods to import AFNetworking, I get the following error after I try pod install [!] Unable to satisfy the following requirements: AFNetworking (~> 3.0) required by Podfile Specs satisfying the AFNetworking (~> 3.0) dependency were…
jackLeung
  • 41
  • 8
5
votes
1 answer

AFNetworking 3.0 on disk image caching

Is it possible in AFNetworking to cache image on disk for more than session? For example for a week or month. In my project i used SDWebImage and AFNetworking, but few days ago i found that AFNetworking has the same functionality as SDWebImage, so a…
Roman Simenok
  • 500
  • 7
  • 19
5
votes
6 answers

AFNetworking 3.0 can't download image

I am trying to download an image using AFNetworking 3.0 doing this way: - (UIImage *) loadImage:(NSString *) link { __block UIImage *image = [UIImage imageNamed:@"no_user_profile_pic.png"]; AFHTTPSessionManager *manager =…
Eugene
  • 145
  • 1
  • 10
5
votes
1 answer

AFNetworking 3.0 and SSL authentication with setSessionDidReceiveAuthenticationChallengeBlock

I'm attempting to migrating from AFNetworking 2.0 to 3.0. In the previous version I would create an AFHTTPRequestOperation and handle client SSL authentication in another block with setWillSendRequestForAuthenticationChallengeBlock. For…
quikbeam
  • 169
  • 1
  • 3
  • 11
5
votes
0 answers

AFNetworking reachability for IP address in swift - always matching general reachability?

I need some help understanding why I'm seeing the following. AFNetworking 3.0.4 on iOS9.x If I grab the reachability manager with AFNetworkReachabilityManager.sharedManager() and then add a setReachabilityStatusChangeBlock then I get exactly what I…
1
2 3
17 18