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

Fifth NSURLConnection's delegate not called

I am using NSURLConnection in my app for downloading. It is working fine.When i start the connection the delegates methods - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSHTTPURLResponse*)response -…
0
votes
0 answers

NSURLConnection gets data from unknown HTML page

I have a class that creates a NSURLConnection with the class set as the delegate. The connection sends a request to our server to get back a list of data. Everything has been working great except one day, the delegate function (didReceiveData:)…
Georges
  • 307
  • 3
  • 13
0
votes
2 answers

Multiple NSURLConnection sendAsynchronous requests with a singleton class

I am using a Master Detail Controller. In the Master list there are 5 items. On selecting each item, there are Asynchronous calls made. There is one SingleTon class, which handles all network calls. [[MyNetwokCommunication connectionInstance]…
NNikN
  • 3,720
  • 6
  • 44
  • 86
0
votes
1 answer

How to change icons based on the percentage of download completed?

In iOS, how do I change the icon based on the percentage of download completed so that the user can get experience of downloading? - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { …
Ashok R
  • 19,892
  • 8
  • 68
  • 68
0
votes
1 answer

calling custom and delegate method from another class

I am a beginner in objective c. I have two classes Connectivity and SignInViewController, and what i want is to call the methods defined in a class on a single call from another class. I came to know that, i can achieve it through protocol or…
Kunal Kumar
  • 1,722
  • 1
  • 17
  • 32
0
votes
1 answer

Getting NSURL Error -1012 in NSURL Request

I am creating the iOS app that uses rest API's that is hosted on HTTPS. This domain have valid CA approved certificate for SSL and TLS. But when I make a NSURL request from my app it works fine first time but after half an hour when I will make…
0
votes
1 answer

POST request not receiving all json

Little issue that's been bothering me. I've been making a POST request to my AWS RDB. The request should return a json output. The issue I'm having is that I'll receive bytes back, but sometimes it contains incomplete json, thus converting it to a…
0
votes
1 answer

No code execution when the method sendAsynchronousRequest of NSRLConnection fails

I've implemented this operation: [NSURLConnection sendAsynchronousRequest:theRequest queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { if (connectionError) { …
0
votes
0 answers

NSURLConnection works with one delegate and not another

I've used NSURLConnection a thousand times. This one is not sending the request, or calling the delegate callbacks. If I set the delegate to nil, the request does go out over the wire. No callbacks, of course. If I set the delegate to some other…
0
votes
1 answer

objective-c wait until NSURLConnection connection did finish loading

I have a method which starts an NSURLConnetion to read an IP-Address an return the IP after the connection did finish loading: - (NSString *)getHansIP { self.returnData = [[NSMutableData alloc] init]; NSMutableURLRequest *getIpRequest =…
0
votes
2 answers

NSURLAuthenticationMethodServerTrust validation for server certificate

I am handling https authentication for server based on its name but i want to trust server based on a certificate which server gives me. how can i do this ,any help ?? - (void)connection:(NSURLConnection *)connection …
vishnuvarthan
  • 492
  • 1
  • 6
  • 23
0
votes
0 answers

How to Solve The Network Connection Was Lost Error in swift?

I am using Xcode 6.1.1(6A2008a).I create an application with have a Download class, and this is the Download class: import Foundation import UIKit @objc protocol ConnectionDelegate { func ConnectionDidFinish(nstate: NSString, nData:NSData,…
0
votes
1 answer

NSURLConnection Upload file, inconsistent byteWritten value

i am using NSURLConnection and it's delegates to upload file to the server. I am using below method to get how much data gas been send till now. - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten …
iAsh
  • 447
  • 6
  • 19
0
votes
1 answer

is there any way to add activity indicator to wait upto data fetched completeley from nsurlconnection

I have a Login page in that when i press "login" button i have to call a webservice and load new view according to the response it is taking 3 to 4 seconds i want to show activity indicator for loading view how to show that i'm using asynchronous…
0
votes
1 answer

NSURLConnectionDelegate - Use of undefined identifier 'connection'

I'am new to objective-c so please for forbearance. I just copied and pasted code from tutorial about post request in ios and during implementing connection method i've got an following error: ViewController.h #import @interface…
mkkrolik
  • 1,200
  • 14
  • 21