Questions tagged [nsurlconnection]

An NSURLConnection is the Apple Foundation Framework class that provides support to perform the loading of a URL request. It is deprecated and should be replaced by NSURLSession.

An NSURLConnection object provides support to perform the loading of a URL request. The interface for NSURLConnection is sparse, providing only the controls to start and cancel asynchronous loads of a URL request.

It is deprecated in iOS 9.0 and OS X 10.11 and should be replaced by NSURLSession.

NSURLConnection Class Reference

3110 questions
1
vote
0 answers

How to download epub Format file from URL to Document Directory in Iphone

I want to save an epub format file from url into App Document Directory.When I hit this url in browser it provides a downloading file where as when I send the request in NSURLConnection it provides me data, upon converting this data in to NSString…
Sumit Sharma
  • 1,847
  • 1
  • 22
  • 25
1
vote
1 answer

Making threaded NSURLConnections

I have a lot of connections going when my app starts, so I wanna put them on background threads so I can make new connections other than the starting connections before they all complete. Below, threadedRequest: is a method that's starting a…
Chris
  • 7,270
  • 19
  • 66
  • 110
1
vote
1 answer

NSURLConnection and persistent connections

I have a question related to NSURLConnection and persistent connections. Whenever NSURLConnection is cancelled, does it deletes the related persistent connection as well? or persistent connection will be retained until it expires? Thanks for the…
Vinay
  • 149
  • 1
  • 9
1
vote
3 answers

reloading UIWebView makes it blank

I am loading a webpage in a UIWebView using the following method [NSURLConnection sendAsynchronousRequest:request queue:loadingQueue completionHandler:^(NSURLResponse *response, …
Nikhil J Joshi
  • 1,177
  • 2
  • 12
  • 25
1
vote
2 answers

How to detect if NSURLConnection sendAsynchronousRequest is finished

I am using sendAsynchronousRequest:queue:completionHandler: upload a file (I have ripped out some old third party library in favor of a direct call with this native method. I have left the NSURLRequest and dictionary as is.). I cannot figure out how…
VaporwareWolf
  • 10,143
  • 10
  • 54
  • 80
1
vote
1 answer

How to test for a partial response from sendAsynchronousRequest:queue:completionHandler:?

I have the following code: NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://some-example-domain.com/api"] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData …
So Over It
  • 3,668
  • 3
  • 35
  • 46
1
vote
1 answer

Stop CFRunLoop of background thread

Anyone know how to stop run loop of background thread from main thread ? I have a class which has function for download file from server. From main thread I am calling function sendHttpRequest in background thread to download file from server. [self…
Khushbu Shah
  • 1,603
  • 3
  • 27
  • 45
1
vote
1 answer

nsprogressindictor progress not getting fully completing after nsurldownload in cocoa webview

My progress indicator is not working in cocoa webview I used this code - -(void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)response { NSLog(@"downl didreceiveresponse here"); …
Sierra
  • 337
  • 3
  • 15
1
vote
1 answer

How to verify the integrity of a downloaded file?

StoreKit has a bug that can lead to incomplete downloads being marked as "Finished". I have seen some apps that download large files after In-App Purchases do an integrity check on them. How is this done?
openfrog
  • 40,201
  • 65
  • 225
  • 373
1
vote
0 answers

response.expectedContentLength allway return -1

i have a connection use NSURLConnection, i want to draw a progress for this connection but when i try to print current received data and total data length, something went wrong ,response.expectedContentLength allway return -1, why and what happen…
1
vote
1 answer

connectionDidFinishLoading is not called, why?

I send request, but don't call method connectionDidFinishLoading, why? - (void)startHttpRequestWithCookie:(NSArray *)authCookies { NSURL *url = [NSURL URLWithString:@"http://test.test/mbox.php"]; NSMutableURLRequest *request =…
Alexander
  • 627
  • 2
  • 11
  • 23
1
vote
2 answers

Trouble sending https POST request to server via API, getting "HTTPS Required"

In the app I'm building, I need to send a secure POST request to an API. The body of the request is JSON. Specifying the request as below: NSMutableURLRequest *urlRequest=[NSMutableURLRequest requestWithURL: …
Johanna
  • 11
  • 2
1
vote
2 answers

JSON truncated when sent via NSMutableURLRequest to APS.NET MVC controller

I am building a JSON post in objective-c and sending it to an ASP.NET MVC controller. I am building the NSMutableURLRequest as follows: request = [[NSMutableURLRequest alloc] initWithURL:url]; NSString* jsonRequest = [NSString…
Journeyman
  • 10,011
  • 16
  • 81
  • 129
1
vote
1 answer

NSURLConnection response not complete

I am making call to a server requesting JSON data using NSURLConnection. For some reason I get part of the response. If I hit the url through the browser the response its correct. The weird thing is that it happens only sometime. So I'm having a…
Rico
  • 57
  • 9
1
vote
1 answer

How to convert this HTML form to iOS

I'm trying to subscribe emails to my Sendy installation running on my EC2 server - the API docs for Sendy can be found here. In my list, Sendy suggests that
Undo
  • 25,519
  • 37
  • 106
  • 129