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

In RestKit 0.2.x, overriding the NSURLConnectionDataDelegate implementation found in RKHTTPRequestOperation to achieve download progress indication

The newer RestKit 0.2.x is great but I cannot find any hook out of the RKHTTPRequestOperation : AFHTTPRequestOperation : AFURLConnectionOperation class to extend it's implementation of NSURLConnectionDataDelegate, which…
1
vote
1 answer

NSURLConnection method needs to be changed to pass authentication challenge

i have a method for http connection, which was working fine for me until the server i am trying to have an invalid ssl certificate. Since i am using [NSURLConnection sendSynchronousRequest:returningResponse:error] There is no chance to pass…
erdemgc
  • 1,701
  • 3
  • 23
  • 43
1
vote
1 answer

Objective-C - block loop from continuing until delegate method is called

In each loop, I initialize a connector class with an id that is used to perform a JSON call. The problem is, is that this loop continues to iterate before the connectionDidFinishLoading delegate method of the connector class completes, parses the…
1
vote
0 answers

Objective C: SSL Pining

I have implement NSURLConnectionDataDelegate in my class and I have implemented the method: - (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; But when I make new…
1
vote
1 answer

Testing and asynchronous NSURLConnection request's response with Xcode

I'd like to take advantage of the testing classes and methods in Xcode to check the responses I receive from several asynchronous HTTP services requests my app does, in order to see if I receive and parse correctly the expected parameters.…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
1
vote
1 answer

Getting the reponse body of a 302 HTTP redirect with NSURLConnection

I'm sending a HTTP GET request to an URL using NSURLConnection with the delegate. The request gets redirected with a HTTP 302 and the new request is performed and the data retrieved. The problem is that I don't want the body of the redirected HTTP…
1
vote
1 answer

NSURLConnection stops receiving data

I've recently finished an app which connects to a number of web services provided by my client. I've done this countless times in the past without any problems. However, for some reason, with one of the services, which downloads about 250kb-1mb of…
1
vote
1 answer

iOS NSURLConnection didReceivedData more than one task

I have big problem in iOS. For some reasons,I must use asynchronous,Because I want to pass SSL error. So,I use NSURLconnection and get response data from Web server in didReceiveData. and it work very well when I just post one url to server. But my…
1
vote
1 answer

How can I receive my data in pieces with using NSURLConnection's sendAsynchronousRequest method?

When I send a synchronous request with NSURLConncetion [NSURLConnection initWithRequest:myRequest delegate:self]; I can receive my downloaded data in pieces with the following method - (void)connection:(NSURLConnection *)connection…
Tyler Pfaff
  • 4,900
  • 9
  • 47
  • 62
1
vote
0 answers

NSURLConnection not receiving delayed response

My response to a web-service is huge and takes about a minute or a little more for the response. But the NSURLConnectionDelegate methods don't respond to these delayed response. It doesnt receive any data. What do i do ? Here is my code…
Sharanya K M
  • 1,805
  • 4
  • 23
  • 44
1
vote
1 answer

Saving Variable value outside of Connection didReceiveData Ùdelagate Method

I have tried to find a similar question but I was unable to do so. I have a singleton that is used to gather information through out my app. Once of the values is obtained within the following method. -(NSString *)connection:(NSURLConnection…
1
vote
0 answers

NSURLConnection delegate not called

I have been scratching my head trying to work out why NSURLConnection is not calling its delegate methods to my class. The method will work fine 99.999% of the time but on the odd occasion the NSURLConnection will be created and then not call back.…
1
vote
3 answers

NSURLConnectionDelegate callback in one function

I'm trying to make my own Request class I intend to use throughout my app. Here is the code I've been coming up with so far. -(IIWRequest *)initAndLaunchWithDictionnary:(NSDictionary *)dictionnary { self=[super init]; if (self) { //…
1
vote
0 answers

Error in using asynhronous request in iOS%?

I have done web services using synchronous request, using the following code, NSURL * url=[NSURL URLWithString:"\\urlString"]; NSMutableURLRequest * request=[NSMutableURLRequest requestWithURL:url]; NSError * error; NSURLResponse * response; NSData…
Chandru
  • 247
  • 2
  • 18
1
vote
0 answers

IOS app crashes after sending request (object releases)

I am new Obj_c, cant understand the stack traces, which i found during the crash: i simply send a request to server but before receiving the response app crashes. Anybody can help me plz!!
nidIOS
  • 167
  • 1
  • 9