Questions tagged [nsurlconnection]

An NSURLConnection is the Apple Foundation Framework class that provides support to perform the loading of a URL request. It is deprecated and should be replaced by NSURLSession.

An NSURLConnection object provides support to perform the loading of a URL request. The interface for NSURLConnection is sparse, providing only the controls to start and cancel asynchronous loads of a URL request.

It is deprecated in iOS 9.0 and OS X 10.11 and should be replaced by NSURLSession.

NSURLConnection Class Reference

3110 questions
1
vote
1 answer

Delegate method not updating UI in iPhone

This is a weird one. I am using the NSURLConnectionDelegate to retrieve information from a webservice. In the connectionDidFinishLoading method I send a message to a delegate to update a UITableView and hide a "Loading..." UILabel. The delegate…
Choppin Broccoli
  • 3,048
  • 2
  • 21
  • 28
1
vote
1 answer

iOS Slow First Time Authentication Against ASP.NET Basic Service

Does anyone else have an issue with slow initial authentication against ASP.NET Basic Service? When my app logs in for the first time it takes around 3-4 seconds to auth against the server, after that it's pretty fast but this initial login time is…
Travis M.
  • 10,930
  • 1
  • 56
  • 72
1
vote
1 answer

Save file at iphone but archive is corrupted

I download a file with NSURLConnection methods, but when I try to save and load data the archive is corrupted This is my code any help is appreciated NSNumber *filesize; NSMutableData *data2; - (void)connection: (NSURLConnection*) connection…
Fabio
  • 1,913
  • 5
  • 29
  • 53
1
vote
1 answer

get size file NSURLConnection?

I need to get the file size before downloading. And using a progressbar here is my code works well unless if the file is hosted on Hostmonster server I would like to know what is the error. The error is as follows: [NSConcreteMutableData…
Fabio
  • 1,913
  • 5
  • 29
  • 53
1
vote
1 answer

Memory when using NSURLConnection and dispatch_async never gets released

In the interest of knowing how stuff works I have written a simple iPhone application that has a start button. Pressing that button triggers an action to do the following: - (IBAction)start:(id)sender…
1
vote
1 answer

NSURLConnection sendAsynchronousRequest results in "A server with the specified hostname could not be found"

I'm doing some network requests using [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:completionHandler]. Unfortunately, half the time I perform these requests, I get an NSError with A server…
1
vote
0 answers

NSURLConnection Uploading empty files

I am using NSURLConnection to submit a file and some information to a form using a HTTP Post. This form then uploads the file to an FTP server. This has worked for the past few weeks just fine. However at some point yesterday I must have changed…
Michael M
  • 1,034
  • 2
  • 8
  • 21
1
vote
0 answers

NSURLConnection Blocking UI

I am trying to run an asynchronous NSURLConnection but its causing my UI to be blocked everytime i receive a response. I was under the impression that an async connection does not block the UI i have also setup a runloop so i can respond to incoming…
1
vote
1 answer

Calls to NSURLConnectionDataDelegate methods to download images only works occasionally

I currently have two UIImageViews in my storyboard, one of which downloads my own Facebook profile picture, and the other a friend's profile picture. However, my issue is that only 60% of the time this works as expected, while the other 40% of the…
daspianist
  • 5,336
  • 8
  • 50
  • 94
1
vote
0 answers

AFNetworking and strange error -999

I have strange problem with AFNetworking framework. This problem is not common, it happens sometimes and I can not find the reason. It works 5 times in row and the next time, on the same request it returns NSUrlErrorDomain -999. [self…
1
vote
1 answer

Bug with NSURLConnection.....?

I am trying to send the data to server from my IPhone client. It works fine for most values but when i try to send a string like "IPhone+Cocoa" the server shows the string as "IPhone Cocoa". I have tried to google it but without success is there any…
Ansh
  • 53
  • 7
1
vote
2 answers

NSURLConnection leakage

I'm following the official Apple sample http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html While examining my code with Instruments I found a leak, caused by the non released…
neil
  • 81
  • 2
  • 3
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
1 answer

Basic auth iOS 6 - Not working

I am trying create a login screen which sends login info sharepoint server and i expect to be able to successfully login. There are plenty of old examples and libraries which I am not able to use. But after spending hours I found this link to have…
Obj-Swift
  • 2,802
  • 3
  • 29
  • 50
1
vote
1 answer

Can I use my NSURLConnection with a UIProgressView?

So in my application I use a NSURLConnection to connect to a server and retrieve text. This is how I initiate my NSURLConnection: NSMutableURLRequest * serviceRequest = [NSMutableURLRequest requestWithURL:postUrl…
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191