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
2 answers

Ignoring SSL certificate errors with NSURLConnection

I'm using [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error)] to pull data from a web service, but the web server has a self-issued…
colincameron
  • 2,696
  • 4
  • 23
  • 46
1
vote
2 answers

Why is my nsurl request not showing up in console?

I am trying to get the redirected url to show up in console. I may be missing a minor detail somewhere in my code.Any help will be appreicated. - (void)viewDidLoad { UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 119, …
Moo Moo
  • 85
  • 7
1
vote
0 answers

Packets dropped during chunked HTTP 1.1 request sent by NSURLConnection

I am using the following code to set up a chunked HTTP 1.1 request (the request itself is a SOAP one but I don't think this is particularly important): NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url]; …
PeterD
  • 642
  • 1
  • 6
  • 17
1
vote
1 answer

No Response from NSURLConnection

I have the following code, which should simply load a URL with post data, and then grab the HTML response from the server: // Send log in request to server NSString *post = [NSString stringWithFormat:@"username=%@&password=%@",…
Wes Cossick
  • 2,923
  • 2
  • 20
  • 35
1
vote
2 answers

How can (void) connectionDidFinishLoading RETURN something?

I have this simple scenario: main.m (which is my main class) myClass.m (which is an additional class) In my plans it should happen something like this (in MAIN.m) myClass *foo = [[myClass alloc] init]; NSArray *array = [foo returnAnArray]; What…
Enrico Querci
  • 543
  • 2
  • 6
  • 11
1
vote
1 answer

Two Methods of Getting an Image from URL: The Differences?

What are the main differences between the following two methods of fetching a UIImage from a URL? I recently switched from Method 1 to Method 2 in my app and seemed to experience a drastic increase in speed when I thought that, essentially, both…
MikeS
  • 3,891
  • 6
  • 35
  • 51
1
vote
2 answers

iOS: NSURLConnection sendAsynchronousRequest delayed operation on NSImageView

I am sending an asynchronous http GET request and the completionHandler is being called correctly. Code in the callback like NSLog gets run as I can see the output in the logs. However, the lines: self.imageView.image = nil; doesn't seem to go into…
tom
  • 620
  • 1
  • 7
  • 16
1
vote
1 answer

How shall I cancel unsurlconnection when using class methods in nsurlconnection

I am using sendAsynchronousRequest:queue:completionHandler: class function of nsurlconnection .How shall I cancel the this connection?
NSCry
  • 1,662
  • 6
  • 23
  • 39
1
vote
1 answer

Using NSURLConnection Multiple times

I am trying to start a second NSURLConnection after starting the first one. My first one works perfectly: the appropriate delegates are all called, and everything executes as planned. However, after the first one finishes, I create a second one, and…
1
vote
1 answer

NSURLConnection Timeout frequently a few seconds after the request

I'm having a weird problem in my app. The NSURLConnection goes frequently to the following delegate method (a few seconds after the request before the timeout occurs): - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError…
Jeremy
  • 1,461
  • 12
  • 26
1
vote
1 answer

Cancelling an NSURLRequest

Is there a method provided in the native SDK to cancel the URL request made? I know this method: [connection cancel] But I am wondering if we can cancel a request. I only want to use the native SDK and I am not allowed to use the third party…
user2070420
  • 533
  • 6
  • 12
1
vote
3 answers

Opening Lots Of NSURLConnections

The app I'm making must fetch a lot of data from a lot of different urls. Let's say, roughly 200 urls, each with 50kb-300kb of data (images). Right now, I'm basically opening all of those url connections at once and letting them finish as they…
MikeS
  • 3,891
  • 6
  • 35
  • 51
1
vote
4 answers

download multiple images in iOS App

I want to download multiple images from URL to my device in iOS App. // // ImageDownload.m // #import "ImageDownload.h" @implementation ImageDownload { int *position; NSArray *downloableImages; } - (void)start:(NSArray *)images…
jfrubiom
  • 141
  • 4
  • 11
1
vote
1 answer

XML Parse with Date(parameter)

I'm trying to parse xml but I have a problem: NSString *url = [NSString stringWithFormat:@"http://ipadress/web_service/list.php?DATE=%@",dateSinc]; NSMutableURLRequest *request =[[[NSMutableURLRequest alloc] init] autorelease]; [request…
Ladessa
  • 985
  • 4
  • 24
  • 50
1
vote
2 answers

NSURLConnection - Grabbing response data when using another class as a delegate, and when there is an authentication challenge

I am using my internal api to retrieve data from my server. I am using Basic Authentication to achieve this. Because of the nature of APIs i am not implementing any session or anything else on my server code, so i am sending username and passwords…
Umut Sirin
  • 2,462
  • 1
  • 21
  • 31
1 2 3
99
100