nsurlconnection

uiimage of uiimageview doesn't update before NSURLConnection sendSynchronousRequest (iphone)

Hi all, I'm replacing an uiimage of uiimageview before calling NSURLConnection sendSynchronousRequest, an as a result i don't see the new uiimage. How i can resolve this? tnx ...

[iphone,twitter] Accessing the Twitter API through a proxy using NSURLConnectionsm, OAuth problem

I'm having no problems with sending an update directly via hxxps://api.twitter.com/, but the app (for the Iphone, I'm using NSURLConnections) I'm working is supposed to allow the user to select a preferred proxy (e.g. hxxps://twitter-proxy.appspot.com/api/ or hxxps://nest.onedd.net/api/), and I keep getting a 401 error (Failed to validat...

UIViewController is popped from view stack and NSURLConnection crashes the application

I am pushing a UIViewController onto a UINavigationController. This view controller immediately starts a download of an xml feed and then parses it. However, if you hit the back button before it is done downloading, and crashes with EXC_BAD_ACCESS. The line that is crashing it is in parserDidEndDocument and is this line: if (self.del...

Cocoa - Is there a way to check on whether not a cache exists for a NSURLConnection?

I would like to be able to log monitor/log when a local machine cache is being used or when the data is being drawn from the remote source. is there a NSURLConnection.cacheExists method? Or better still one that shows the expiration date or other cache details? ...

NSURLConnection connectionWithRequest blocks interface

Hi all. I thought the reason behind having asynchronous requests is to have it run in the background? Well, I'm uploading something using NSURLConnection connectionWithRequest, it all works fine. The only thing is, it results in the Beach Ball of Death and the user interface becomes unusable. Of course there's the possibility to run it ...

How can I process the data received from NSURLConnection

I have create a class MyConnection that extends NSURLConnection. I have implemented some delegate methods. I am able to print the data received from the URL call. However when I pass the MyConnection instance into MyHelper class, I do not get the data received in the MyConnection class. I tried putting a sleep call between the two task a...

NSURLConnection on simulator and iphone performance issues

I'm experiencing a weird problem and i wonder if anybody else has noticed this: I'm using NSURLConnection as it appears in apple's examples to get xml files from a certain server - pretty straight forward. And most of time it works, but sometimes it's just stuck after initialing and don't get into connection's delegate methods. I'm worki...

disable keep-alive in NSURLConnection

How can I disable keep-alive when using NSURLConnection? Seems, that after cancelling and close it it still saves somewhere a socket that I was connected to server with and while the server fetches for information i cannot access another urls from the same server. I wonder if there is a way to completely reset a socket and start another ...

how secure is NSURLConnection over https

I've been reading through a number of questions on this site regarding NSURLConnection and https, but most relate to "untrusted" certificates and how to allow them nonetheless. My question is a little more basic. I am building an app for a client who handle online donations, and I would like to load their donation script using an NSLURLR...

EXC_BAD_ACCESS NSUrlConnection

Hi all, i got an EXC_BAD_ACCESS when i perform the last line of the function (webData). -(void)requestSoap{ NSString *requestUrl = @"http://www.website.com/webservice.php"; NSString *soapMessage = @"the soap message"; //website and soapmessage are valid in original code. NSError **error; NSURLResponse *response; //Convert paramete...

iPhone - NSURLConnection does not receive data

Hi, I have a pretty weird problem with NSURLRequest. I'm using them to make an asynchronous image loading in an UITableView. The first time the tableView displays, all connections from NSURLRequests open correctly but receive absolutely no data, regardless of how long I wait. But as soon as I scroll down in the tableView, the newly crea...

NSURLConnection and the corresponding device type

For the iPad, iPhone, iTouch app that talk to remote web service by making NSURLConnection calls, is there a way for the remote service to tell what kind of device that the call is made from? Basically, how I can know the device type of the device on which my app is running? ...

best way to know the time of upload/download of a file from/onto iPhone

Hi I'm trying to get the time interval I need to download/upload something to/from a server with no password/proxy. I found a method used by ericasadun. Which actually prints the time iPhone needed to download a certain file. - (void) getData: (NSNumber *) which { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init...

NSURLConnection, NSURLRequest, untrusted cert and user authentication

Morning Everyone, I've been attempting to write an application that does some GETs from a remote Web Service that requires authentication. My main problem is that the majority of these remote servers (and there are a lot of them) don't have valid certificates. I've got code to accept the invalid certificate and code to respond to the ch...

Crash after pop'ing stack while a threaded NSURLConnection is open

Error Log says: bool _WebTryThreadLock(bool), 0x3c689f0: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now... App structure: worker threads are detached from the MainThread as new data is needed via user interaction, eac...

iphone application communicating with a java servlet on a WebSphere.

Hello, Here is a Generic question: I wish to build an iPhone application that will communicate with a Java Servlet installed in a webSphere, my iPhone application will ask the servlet to perform some SQL queries in the connected DB, and will receive the answers accordingly. Please help to understand the following questions: How shou...

How can I get NSURLResponse body?

Hi, I'm writing an application that connect with a server using NSURLConnection. In the delegate method didreceiveresponse:, if the status code is 404, I cancel the connection and I would like to show a message with a custom error that is generated in the server. The problem is that from response object, I only can get statuscode, he...

Objective-C object release and allocation timing

The code for this question is too long to be of any use. But I'm pretty sure my problem has to do with releasing a class. I have a helper class, ConnectionHelper.h/.m, that handles a NSURLConnection for me. Basically, I give it the URL I want and it returns the data (it happens to do a quick json parse on it too). It has a delegate w...

iPhone Custom CA certificate for an application which uses NSURLConnection?

I have an application which is communicating with many different sites and each site has its own SSL certificate signed by our own internal CA. Doing this prevents us the need from purchasing SSL certificates for each site (hundreds or thousands) and is more secure then using a wildcard certificate with a shared key on each of those site...

Asynchronous Request make for-Loop waiting for didFinishLoading

Hey guys, I have a asynchronous url request within a for loop. This loop is called 20 times, each time one parameter of the webaddress is changed. Everytime the didFinishLoading method is called I want to hand over the data of this specific webadress. The problem now is that when I run the for loop, the didFinishLoading method is not c...