Questions tagged [nsurlconnectiondelegate]

The NSURLConnectionDelegate protocol defines methods common to the NSURLConnectionDataDelegate and NSURLConnectionDownloadDelegate protocols.

The NSURLConnectionDelegate protocol defines methods common to the NSURLConnectionDataDelegate and NSURLConnectionDownloadDelegate protocols.

Delegates of NSURLConnection objects should implement either the data or download delegate protocol (including the methods described in this protocol). Specifically:

If you are using NSURLConnection in conjunction with Newsstand Kit’s downloadWithDelegate: method, the delegate class should implement the NSURLConnectionDownloadDelegate protocol.

Otherwise, the delegate class should implement the NSURLConnectionDataDelegate protocol.

Source: NSURLConnectionDelegate class reference

Useful links

167 questions
1
vote
2 answers

How https request is handling using NSURLConnection

Can anybody help me to know how https request are processing using NSRULConnection? I had gone through lot of tutorials and Apple documentation. But I am not able to understand how it is working. I have implemented the following delegates to process…
sree_iphonedev
  • 3,514
  • 6
  • 31
  • 50
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
1 answer

How to get the redirect URL using NSURLConnection, when server returns 'Moved temporarily' or 'Moved permanently'?

I have a URL with format schema://hostname (e.g. https://some.server.com). I'm trying to get the redirect page (in my case to a login form) (e.g. httpx://some.server.com/this/is/you/loginpage) Browsers will automatically redirect to this page, which…
1
vote
2 answers

NSURLConnection best practise when enter background

I notice in my app that when application enter background while loading causes the error such as "timeout" or "host name not found" . It is due to the process that does not allow connection to run in background for a long time. But that kind of…
Kong Hantrakool
  • 1,865
  • 3
  • 20
  • 35
1
vote
0 answers

IOS willCacheResponse in connection delegate

I would like to know which method is the validation part that will identify the cache-control header in response and that will call connection:willCacheResponse: delegate. Because here I have customized the response header and expected…
nik
  • 2,289
  • 6
  • 37
  • 60
1
vote
1 answer

ios NSURLConnectionDataDelegate didReceiveData callback not called

I have a problem. I have read a lot of topics on stackoverflow about this problem but nothing helped. I am trying to implement client-server communication via comet connection. I have an instance which is responsible for sending messges and…
dp_
  • 75
  • 1
  • 1
  • 6
1
vote
1 answer

Using NSURLConnection with iOS 5 doesn't work properly

UPDATE: Apparently on iOS 5 the problem is the "Chunked-Encoding", When sending without that everything works. Seems on server that for some reason on iOS 5 the transfer never ends (on iOS 6 everything works). Anyone has a way around that? I'm…
Idan
  • 9,880
  • 10
  • 47
  • 76
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
2 answers

NSURLConnection status code for Asynchronous request iOS 6

Currently using sendAsynchronous from NSURLConnection to make post and get requests, but can't get the status code in the response. Most post suggest the use of NSURLConnection and its delegate methods, which I understand are also Asynchronous. I…
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

Need assistance regarding downloading data using NSURLConnection

My app is a messaging app, it can also send image files. I am just uploading as image on web server and on other side just sending its url, with NSURLConnection i am trying to download an image with UIProgressView as a download indicator, here is my…
S.J
  • 3,063
  • 3
  • 33
  • 66
1
vote
0 answers

How to accept trusted certificate added to iOS device via iPhone Configuration Utility in application

I want my application to have the ability to accept trusted root certificates that have been added to an iOS device by using the iPhone Configuration Utility. I added a trusted certificate to an iOS device using the iPhone Configuration Utility and…
cebert
  • 71
  • 3
1
vote
0 answers

always! On iOS 6.0 and on 3G network NSURLConnection is getting failed with didFailWithError?

I checked on stackOverFlow and other, that on didReceiveData:, didReceiveResponse: are available with NSURLConnectionDataDelegate upon Version 4.3. From version 2.3 to 4.3 they are available in NSURLConnectionDelegate. Have a look at these:…
Venkatarao N
  • 245
  • 3
  • 14
1
vote
1 answer

Do multiple NSURLConnections create multiple NSThreads?

NSURLConnection's documentation says that NSURLConnection is run on a separate thread and that delegate methods are called on a thread that started the connection. I have more that one NSURLConnection objects wrapped in "URLDownload <…
vale4674
  • 4,161
  • 13
  • 47
  • 72
1
vote
1 answer

iOS5 - Implementing NSURLConnection sendAsynchronousRequest:

I am familiar with using the following method. I know that when using the following, you need to implement at least the required protocol methods: [NSURLConnection setConnection:[[NSURLConnection alloc] initWithRequest:request delegate:self]]; Can…
Slinky
  • 5,662
  • 14
  • 76
  • 130