afnetworking-2

'Project Name' was compiled with optimization - stepping may behave oddly; variables may not be available

不想你离开。 提交于 2019-11-26 05:57:39
问题 Trying to step into AFNetworking code generates following warning: [Project Name] was compiled with optimization - stepping may behave oddly; variables may not be available. And of course I\'m not able to debug the code. To be specific I\'m trying to debug UIImageView+AFNetworking category which seems impossible. Changing the code has no effect (tried NSLog , etc) and when trying to step in compilers goes to assembly code and shows UIImageView+TVASTAFNetworking as category name which does not

Uploading image with AFNetworking 2.0

爱⌒轻易说出口 提交于 2019-11-26 05:20:42
问题 I\'m banging my head against the wall with this one. I want to select UIImage from library and upload it to server, like on could do with <form action=\"http://blabla.request.cfm\" method=\"post\" enctype=\"multipart/form-data\"> . Instead of success I got this error: error = Error Domain=NSCocoaErrorDomain Code=3840 \"The operation couldn’t be completed. (Cocoa error 3840.)\" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x145e5d90

AFNetworking and background transfers

心已入冬 提交于 2019-11-26 03:49:26
问题 I\'m a bit confuse of how to take advantage of the new iOS 7 NSURLSession background transfers features and AFNetworking (versions 2 and 3). I saw the WWDC 705 - What’s New in Foundation Networking session, and they demonstrated background download that continues after the app terminated or even crashes. This is done using the new API application:handleEventsForBackgroundURLSession:completionHandler: and the fact that the session\'s delegate will eventually get the callbacks and can complete

AFNetworking Post Request

和自甴很熟 提交于 2019-11-26 02:41:30
问题 I\'m a newbie in obj-c and have been using asihttp for some of my projects. When doing a post request in asihttp its done this way. ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; [request setPostValue:height forKey:@\"user[height]\"]; [request setPostValue:weight forKey:@\"user[weight]\"]; [request setDelegate:self]; [request startAsynchronous]; How would go about doing this is AFNetworking with a code example ? I already got the get Json getrequest working in

Request failed: unacceptable content-type: text/html using AFNetworking 2.0

怎甘沉沦 提交于 2019-11-26 01:55:43
问题 I\'m trying out the new version 2.0 of AFNetworking and I\'m getting the error above. Any idea why this is happening? Here\'s my code: NSURL *URL = [NSURL URLWithString:kJSONlink]; NSURLRequest *request = [NSURLRequest requestWithURL:URL]; AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; op.responseSerializer = [AFJSONResponseSerializer serializer]; [op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@\"JSON: