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

NSURLConnectionDelegate is not being called

I'm another newbie to the iOS world and have been trying to figure out how NSURLConnection works with it's delegate. I'm not having much luck. After looking through several examples on the net, I created the following test class. The problem i'm…
DaveR
  • 1,295
  • 1
  • 13
  • 35
0
votes
1 answer

How do I define NSMutableData instance for NSURLConnection?

From https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html#//apple_ref/doc/uid/20001836-BAJEAIEE NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest…
adamek
  • 2,324
  • 3
  • 24
  • 38
0
votes
1 answer

Request format is invalid: text/xml; charset=utf-8

I am new to iphone development. I am trying to send NSSTRING to server from iphone application. With following line of Code NSString *soapMessage = [NSString stringWithFormat: @"
0
votes
1 answer

Timeout interval in synchronous download procedure iOS?

I have created request as below, NSURLResponse *response; NSError *error; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:JsonURL]; [request setTimeoutInterval:10]; [NSURLConnection sendSynchronousRequest:request…
0
votes
1 answer

Drawing suspended while processing async NSURLConnection receive data

I'm loading data from a server and processing the response asynchronously. Using NSURLConnection. Each call to the delegate, connection:didReceiveData: is processing that chunk. However, right before a big chunk of data is received, I requested a…
David
  • 2,770
  • 5
  • 35
  • 43
0
votes
1 answer

How to verify user has already login using NSURLConnectionDelegate

I am using NSURLConnection and NSURLConnectionDelegate protocol to post a URL with username and passwords entered from iPhone client to the server. Once the server receives the URL, the web service provided on the server will then populate some data…
newguy
  • 5,668
  • 12
  • 55
  • 95
0
votes
2 answers

Objective c delegate self release

Let's say I have some kind of static class, I mean .h class for my static library with all static functions. Some of function do async request to web service and using NSMutableURLRequest with initWithRequest:request. Since I want to monitor data…
0
votes
3 answers

NSURLConnection doesn't receive data

I have implemented an NSURLConnection that sends a request to a server and receives some data back which is stored in an NSMutableData object. These are the methods that I implemented as part of NSURLConnectionDelegate: …
Tim Stullich
  • 251
  • 6
  • 19
0
votes
1 answer

Unit Testing an NSURLConnection Delegate: Faking a Connection

I'm writing a weather application and I've created a sort of weather model that does all the calculations, fetching of data, etc. Before I created the ViewControllers, I wanted to write some unit tests for my model to ensure that everything was…
0
votes
1 answer

NSURLConnection Timeout Not Wotking

Im trying to download a file using NSURLConnection I've prepared the url request, delegate methods, etc. I also set the timeout to 15.0 and I'm triggering the download on main thread with a code like this: NSURLConnection *connection =…
Abcd Efg
  • 2,146
  • 23
  • 41
0
votes
0 answers

connection:canAuthenticateAgainstProtectionSpace: not called for 'unsupported' authentication methods

In my NSURLConnectionDelegate instance, when the connection receives a 401 Unauthorized response to an HTTP request which contains an authentication challenge header corresponding to one of the documented supported authentication methods (e.g.…
Greg Beech
  • 133,383
  • 43
  • 204
  • 250
0
votes
2 answers

NSURLConnection and NSURLConnectionDelegate work on different thread

as descripted in the title, I did some NSURLConnection like this. But I found that the delegate method couldn't get run. Anyone knows how to deal with it ? edit: my delegate works on the main thread, while NSURLConnection works on an operation…
anna
  • 662
  • 5
  • 28
0
votes
1 answer

How to receive data from NSURLConnectionDelegate when switching from the network?

I am creating a class which communicates with remote server. Currently my device (iPhone 4) is having connectivity via wifi and local network cellular. By default it uses wifi. It works fine in both the cases. However when I switch from wifi to cell…
Apurv
  • 17,116
  • 8
  • 51
  • 67
0
votes
1 answer

Connection class implementing NSURLConnectionDataDelegate

I would like to ask you about NSURLConnection in objective-c for iPhone. I have one app that needs to connect to one webservice to receive data (about YouTube videos), Then I have all the things that I need to connect (Similar to Hello_Soap sample…
pepersview
0
votes
1 answer

NSURLConnection is not calling didFailWithError.

I am attempting to write a bit of code that checks the URL of a datasource, then populates an array with objects from that URL. It actually works well, but if there is a problem with the web connection or the address I want to populate the array…
1 2 3
11
12