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
5
votes
3 answers

Will [NSURLConnection sendAsynchronousRequest: ...] always send completion block?

Most likely a rather trivial question but will the completion block always be called using [NSURLConnection sendAsynchronousRequest: ...]? OR do I have to implement a timeout timer? Consider the following where I add a MBProgressView before the call…
Groot
  • 13,943
  • 6
  • 61
  • 72
5
votes
1 answer

NSURLConnectionDelegate. How Do I Cancel an Authentication Challenge?

I am successfully using the rather awesome connection:didReceiveAuthenticationChallenge: delegate method of NSURLConnectionDelegate. Cool. I want to properly support letting the user cancel out of an authentication challenge. So, the GUI I present…
dugla
  • 12,774
  • 26
  • 88
  • 136
4
votes
1 answer

Using NSURLConnection with a valid SSL certificate in Swift

I am relatively new to IOS development. So please bear with me and forgive anything noddy! I am trying to get data back from a SOAP web service using NSURLConnection, and it's working fine. However, as soon as I change the URL from http to https…
Dave
  • 351
  • 4
  • 18
4
votes
1 answer

Can NSURLConnection use a client certificate installed in profiles on the device?

I have this setup: A tomcat server configured to use ssl client certificate authentication (clientAuth=true) An ipad with a valid client certificate installed on it (emailed as a .p12 file and visible under profiles) When browsing via ios safari,…
Jon N
  • 1,439
  • 1
  • 18
  • 29
3
votes
3 answers

iOS4 Implementation of -[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]?

How can I implement -[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] for iOS < 5? #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0 #import #import "NSURLConnection+iOS4.h" // Dynamically add -[NSURLConnection…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
3
votes
1 answer

SSErrorDomain error code 109. NewsStand download from Amazon S3

While downloading a file from Amazon S3 in iOS. Intermittently NSURLConnectionDownloadDelegate's method didFailWithError: get called and this is what I got when I logged received NSError object Error Code: 109 Error Domain: SSErrorDomain Error…
msk
  • 8,885
  • 6
  • 41
  • 72
3
votes
3 answers

Proper way to close NSURLConnection

I am using server client architecture in my application. I am using NSURLConnection class,now suppose i am sending multiple requests in for loop and using async connection with delegate methods.So my question is after I got response from server do I…
Vaibhav
  • 865
  • 2
  • 10
  • 19
3
votes
0 answers

NSURLConnection leak in Swift

I've found several other articles about memory issues with NSURLConnection however none of them related to projects using ARC. My problem is that I make NSURLConnections every 0.5s (yes I know it would be better with sockets, but I don't have…
hris.to
  • 6,235
  • 3
  • 46
  • 55
3
votes
1 answer

How to debug CFNetwork SSLHandshake failed (-9824) in Mac Os X?

My Mac Os X app needs to access different servers in Brazil and one of the servers seems to have an sslv3 issue. It seems that access thru MS Windows solutions is normal. I tried using Internet Explorer and it works. This is an example of what…
fundidor
  • 207
  • 3
  • 12
3
votes
2 answers

NSURLConnection didSendBodyData progress

I'm using a POST request to upload some data to a server, and I'm trying to update the UIProgressView's progress based on the totalBytesWritten property of the didSendBodyData method of NSURLConnection. Using the below code, I don't get a proper…
3
votes
2 answers

NSURLConnection Delegate methods not getting called after two times

I am sending a request to server using NSURLConnection, it worked for 2 times , since third time it is not working, delegates are not being called. What i found during debugging is connectionShouldUseCredentialStorage method is called for initial…
SwathiK
  • 364
  • 3
  • 13
3
votes
2 answers

setbackground loading with do while loop

i am working on an application where i check for url using following code. -(void)exists { NSString *strImg = @"some url"; NSURL *aImgUrl = [NSURL URLWithString:strImg]; NSMutableURLRequest *imgRequest = [NSMutableURLRequest…
3
votes
1 answer

Implementing NSURLConnectionDataDelegate Protocol

I am new to iOS development. I am trying to implement NSURLConnectionDataDelegate Protocol but it seems that none of the delegate methods ever get called. I had to type the delegate methods in myself, is it supposed to be automatically generated?…
3
votes
3 answers

NSMutableURLRequest "The request timed out" issue . .

I am trying to download data in my application by using the following code NSURL *url = [NSURL URLWithString:@"my download url string"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url…
3
votes
1 answer

Set the progress to UIProgressView when upload with NSURLConnection

I'm trying to refresh the progress bar in an UIProgressView for an upload request with NSURLConnection. The goal is to refresh the progress bar while uploading a picture. After several searches, I managed to use the didSendBodyData of my connection…
1
2
3
11 12