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

NSURLConnection Not Returning Data

I have a rather unusual issue here. The code below is running fine and the data is sending to the source fine, but none of the NSURLConnection triggers are returning anything. The only items being logged are in the function that the request is sent…
Matt
  • 173
  • 1
  • 3
  • 10
1
vote
1 answer

iphone sdk: pausing NSURLConnection?

In my app I give the user the ability to download files from a server. For that I use NSURLConnection. I would like to give the user the ability to pause and resume the download by tapping a button. I couldn't find any way to do this besides calling…
Alex1987
  • 9,397
  • 14
  • 70
  • 92
1
vote
1 answer

AFNetworking 2.0, downloading image with NSURLSession

I'm trying to download an image from a secure server, using AFNetworking 2.0 and NSURLSession. However, I get a bytestream that cannot be converted into an image if I try to download like this: - (SLRequestExecutionBlock)…
Fervus
  • 710
  • 7
  • 18
1
vote
1 answer

Handling self signed certificates with NSURLConnection

I want to allow a self-signed certificate with an NSURLConnection, provided that the host is in a trusted list. I see a lot of folks doing something like this: - (BOOL)connection:(NSURLConnection *)connection…
Willam Hill
  • 1,572
  • 1
  • 17
  • 28
1
vote
2 answers

NSOperation for drawing UI while parsing data?

Hope you guys can help me :) In the main thread, I create a NSOperation and add it to a queue. What that operation do is connect to a data server with NSURLConnection, save the receivedData and parse it. Operation.m - (void)start { …
1
vote
1 answer

Help getting NSURLConnection progress

The app is downloading a file (plist) which is generated by the server. The server takes a loooong time to generate the file, so I would like to be able to show progress (probably view UIProgressView, but that's not important). Since the file I'm…
kbanman
  • 4,223
  • 6
  • 32
  • 40
1
vote
2 answers

SSL in iOS - Basic steps

In my app I am using HTTP connection to communicate between client and server. All is fine. Now I wish to make the connection secure. I am an absolute beginner and I am clueless where I need to start with when it comes to SSL and iOS. I read many of…
Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62
1
vote
0 answers

NSURLConnectionDownloadDelegate methods not getting called when downloading files over 50 MB via cellular

Supposing I have a snippet of code like this: [assetDownload downloadWithDelegate:self]; All the three delegate methods are implemented: – connection:didWriteData:totalBytesWritten:expectedTotalBytes: –…
Szymon Fortuna
  • 400
  • 1
  • 11
1
vote
1 answer

Why is UITableView not reloading (even on the main thread)?

I have two programs that basically do the same thing. They read an XML feed and parse the elements. The design of both programs is to use an asynchronous NSURLConnection to get the data then to spawn a new thread to handle the parsing. As batches…
radesix
  • 5,834
  • 5
  • 24
  • 39
1
vote
1 answer

UIWebView reloading baseUrl when setting contents from NSURLConnectionDataDelegate

I'm trying to create an single UIWebView-based application. Its main purpose is to provide authentication to a few websites using NTLM or Basic authentication, without the user having to input the username/password for every website when he/she…
lucian.pantelimon
  • 3,673
  • 4
  • 29
  • 46
1
vote
1 answer

Can't extract certificate (Error -26275)

I have UIWebView with NSURLConnection support. I want to add certificate. When I want extract identity and trust from certificate OSStatus returns error -26275. Do you have any ideas how to make it right? Here's the code: -…
1
vote
3 answers

NSMutableURLRequest to post data to URL

I am currently using the following code to attempt at a NSMutableURLRequest. NSMutableURLRequest *postRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:allStrings]]; [postRequest setHTTPMethod:@"POST"]; NSURLConnection *conn =…
1
vote
1 answer

iOS NSURLConnection dictionary or array

I have a NSURLConnection working that the return can be a dictionary or an array How to know what is the kind of response Dictionary or array, so I do the appropriate serialisation? - (void)connectionDidFinishLoading:(NSURLConnection *)connection { …
manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216
1
vote
1 answer

NSURLErrorDomain Code=-1202 when using Syncronous request

I try to send the synchronous request and got the below error. Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xx.xxxx.com” which could put your…
1
vote
0 answers

NSURLConnection Domain=NSURLErrorDomain Code=-1008

When I type the url in a browser it works. When I tried from my program, I have an error. I have no idea why. And you ? NSString *urlString ; urlString =…
jcezanna56
  • 11
  • 1
  • 4