afnetworking

RestKit Post Failure managed object store is nil

岁酱吖の 提交于 2019-12-12 03:42:57
问题 I am trying to POST to a server via RestKit, and while the post is added to the tableView, it doesn't save to the server and I get this error in the xcode console log 2013-06-20 11:08:44.522 App[9653:c07] W restkit:RKObjectManager.m:577 Asked to create an `RKManagedObjectRequestOperation` object, but managedObjectStore is nil. But I believe I setup the managedObjectStore in my appDelegate. I have this: NSError *error = nil; NSURL *modelURL = [NSURL fileURLWithPath:[[NSBundle mainBundle]

iOS doesn't to use http keep-alive. Very high latency

大兔子大兔子 提交于 2019-12-12 03:38:05
问题 I wanted to test latency for my server, so I sent a rest request. Using a rest api client, i got around 500 ms latency from desktop, but when i do the same request on iOS Simulator (using AFNetworking) , I am getting latency of 1.8 seconds. My server sends keep alive headers, and I noticed that the first request from my PC is of a similar latency as IOS. How do I make iOS honour keep alive , or reduce latency ? Since I am making a realtime app , it is a must that I have low latency. From the

send POST request with xml body and recieve xml response with AFNetworking 3.x

我是研究僧i 提交于 2019-12-12 03:35:00
问题 Hi I'm trying to write AFNetworking 3.x post request with xml body and receive xml from server (because server accept xml input and out put xml). I've done successful with JSON but have problem with xml. How to modify these template to send xml body and receive xml response. and what library should we use to parse the xml response? Any help is much appreciate. Thanks NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; AFURLSessionManager

AFNetworking Domain=NSURLErrorDomain Code=-1001 “Request timeout"

我与影子孤独终老i 提交于 2019-12-12 03:20:02
问题 When I launch my app after some times the first request with cellular data not working, I have Domain=NSURLErrorDomain Code=-1001 (request Time out). All works fine in Wifi. When i retry with cellular data all works. Only the first request is not working. Thanks to help. 来源: https://stackoverflow.com/questions/28105388/afnetworking-domain-nsurlerrordomain-code-1001-request-timeout

AFNetworking return 400 bad request

孤街浪徒 提交于 2019-12-12 03:01:54
问题 i want to post image by AFNetworking ,here is the code AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; manager.responseSerializer.acceptableContentTypes = [manager.responseSerializer.acceptableContentTypes setByAddingObject:@"text/html"]; manager.responseSerializer = [AFHTTPResponseSerializer serializer]; manager.requestSerializer = [AFHTTPRequestSerializer serializer]; [manager POST:URL parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData>

AFNetworking Incompatible block pointer types sending

杀马特。学长 韩版系。学妹 提交于 2019-12-12 02:22:30
问题 I am using AFNetworking to access a URL with Windows Authentication. I was using ASIHTTPRequest to login like so: -(BOOL)User:(NSString *)user andPassWordExists:(NSString *)password { NSURL *url = [NSURL URLWithString:kIP]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setUseSessionPersistence:YES]; [request setUseKeychainPersistence:NO]; [request setUsername:user]; [request setPassword:password]; [request setDomain:@"domain"]; [request startSynchronous]; NSError

AFNetworking.framework: No such file or directory in Xcode 8

故事扮演 提交于 2019-12-12 02:19:33
问题 I just opened my project in Xcode 8.0 and tried to build it, but the following "PBXCp Error Group" appeared: error: /Users/username/Documents/XYZ/build/Debug-iphoneos/AFNetworking.framework: No such file or directory My Podfile is below: platform :ios, '10.0' use_frameworks! target 'XYZ' do pod "MSSTabbedPageViewController" pod "SKStatefulTableViewController", "~> 0.1" pod "QBFlatButton" pod "LTNavigationBar" pod "KBRoundedButton" pod "CTCheckbox" pod "SKStatefulTableViewController", "~> 0.1"

AFNetworking+UIImage Downloading Low-Resolution Image First

风流意气都作罢 提交于 2019-12-12 01:08:11
问题 I am having some troubles using the +UIImage setImageWithURL: method. What I would like to do is first send an asynchronous request for a thumbnail image. This image is very small so it should load fairly quickly. I also want to send another asynchrous request to download the hi-res version of the image since it takes a little longer to load. I assumed it would be something like: NSURL *thumbURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.server.com/uploads/thumbs/%@.png",

Can't print the json if response code is 400 in afnetworking?

纵然是瞬间 提交于 2019-12-12 00:29:04
问题 I am using AFNetworking make post request to server.If my response code is 400 then i am not able to print the json response. This is my code AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: @"123", @"post_id", arr_friendsTags, @"tagged_user", nil]; AFJSONRequestSerializer *requestSerializer = [AFJSONRequestSerializer serializer]; [requestSerializer setValue:@"application/json"

Uploading image to server reached damaged using AFNetworking

穿精又带淫゛_ 提交于 2019-12-11 23:25:24
问题 Ive been trying so hard to upload an Image to the server and it uploads successfully but on the server side if i tried opening the image it says cannot be displayed because it contains errors .I am using AFNetworking to upload the image after converting it to JPEGRepresentation. let uploadManager : AFHTTPSessionManager = AFHTTPSessionManager() uploadManager.responseSerializer = AFHTTPResponseSerializer() as AFHTTPResponseSerializer uploadManager.requestSerializer = AFHTTPRequestSerializer()