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
0
votes
1 answer

AFNetworking 1.x to 3.x migration - get download progress?

I need to download image with progress bar. This is what I've got for in AFNetworking 1.x which is not working for AFNetworking 3.x. NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL…
0
votes
1 answer

AFNetworking 3.x: How to know whether response is from cache or not?

The question AFNetworking : How to know if response is using cache or not ? 304 or 200 had been answered well for AFNetworking 2.x. But how do you do the same thing in 3.x? It's very useful to know whether resources were returned from cache or from…
fatuhoku
  • 4,306
  • 2
  • 28
  • 65
0
votes
2 answers

AFNetworking Download & save data when request is successful only

In my iOS Application I am using AFNetworking library to manage required HTTP operations. I have created a method to download a file: + (void)downloadFile:(File *)file progress:(void (^)(NSUInteger receivedBytes, long long totalReceivedBytes, long…
0
votes
0 answers

Getting Code=3840 "Invalid value around character 1." while posting image to with parameters to server

I am using Afnetworking 3.0 , for image uploading with some other parameters i use this code NSData *imageToUpload = UIImageJPEGRepresentation(_profileImageView.image, 1.0);//(uploadedImgView.image); NSMutableDictionary * params =…
Hassan Malik
  • 509
  • 4
  • 18
0
votes
1 answer

AFNetworking 3.0 migration

Now I am using AFNetworking 2.0, I want to migrate it to AFNetworking 3.0. I've added files to the project, it shows many errors. I've checked the migration guide. My doubt is how to set NSURLCredential to the login request url in AFNetworking…
0
votes
3 answers

Make a progress bar for get the response with AFNetworking 3.0

I want to make progress bar for api calling and end with success and i am using the AFNetworking 3.0 version. I do the following code for measure the progress. NSURLSessionDataTask *obj = [manager POST:UrlForGetAllCalEntry parameters:jsonDict…
chirag shah
  • 2,920
  • 1
  • 26
  • 54
0
votes
1 answer

Not able to parse response in JSON response

I am using AFNetworking 3, Xcode 7.2 for iOS 9. AFURLSessionManager *ses = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; ses.responseSerializer = [AFJSONResponseSerializer…
0
votes
4 answers

how do i keep data once out of block code?

I'm trying to parse a JSON link using AFNetworking and MJExtensions. see comments in code. - (void)viewDidLoad { [super viewDidLoad]; NSString *apiURL = @"https://api.forecast.io/forecast/APIKEY/Lat,Long"; NSURL *URL = [NSURL…
highboi
  • 33
  • 7
0
votes
0 answers

Progress block with GET and AFNetworking 3.0 is not called

I have created a subclass of AFHTTPSessionManager: class TBNetworkClient: AFHTTPSessionManager { func wordsWithCompletionBlock(completionBlock: TBErrorHandler) { queryType = .Words GET("words", parameters: nil, progress: {…
Bartłomiej Semańczyk
  • 52,820
  • 43
  • 206
  • 318
0
votes
1 answer

UIImageView+AFNetworking Memory leak from cg raster data

I am using AFNetworking 3.0's UIImageView+AFNetworking to display images in a UICollectionView. However as I keep scrolling, the memory usage of my app keeps growing forever. I used Instruments Allocations tool and am able to narrow down the issue…
0
votes
2 answers

How to return an NSArray in the success block, iOS, Objective-C

this is my code. I want to return an array with data after data assign from the web service to the array.I have use block to check. this is from my header file... typedef void(^FailureBlock)(NSError *error); typedef void(^SuccessBlock)…
Chanaka Anuradh Caldera
  • 4,280
  • 7
  • 34
  • 61
0
votes
3 answers

Use custom HTTP Headers with AFNetworking 3.0

I want to use my http header If-None-Match but I don't find how with AFNetworking 3.0 The Migration Guide doesn't explain anything about that and basically just say to use a normal GET request which doesn't seems helping for me. Here's what I was…
Tancrede Chazallet
  • 6,547
  • 3
  • 35
  • 59
-1
votes
1 answer

display an image from json data using AFNetworking3 objective c

I want to display an image from json data using AFNetworking3 objective c, I used this code but it crashes! this is my son link: mkssab.com/api/index this is my code: NSDictionary *images = data[@"images"]; cell.adPic.image=[images…
-1
votes
1 answer

The questions of AFNetWorking3.0 post Parameters Encode

I use the AFNetWorking3.0, and use a tool (Wireshark) to get the post datas (request), eg I want to post a parameters like @{"name": @"zlj"}, the wireshark can get the right Datas, I can see @{"name": @"zlj"}. But when I use like this, NSDictionary…
-1
votes
3 answers

Why AFNetworking always go into Failure block?

I have integrated AFNetworking from here in my project. But when I do get request using AFNetworking, it always go into the Failure block. Below is my code. Please let me know, What I am doing wrong here? NSString *baseUrl =…
Hussain Shabbir
  • 13,963
  • 4
  • 34
  • 53
1 2 3
17
18