Multiple NSURLConnections being started (in a single UIViewController) to gather different kinds of data. When they return (-connectionDidFinishLoading) I wanna do stuff with the data, depending on the type of data that has arrived. But one prob, HOW DO I KNOW WHICH NSURLConnection returned? I need to know so I can take action specific t...
Sorry if this has been asked before, but I'm wondering what the best memory management practice is for NSURLConnection. Apple's sample code uses -[NSURLConnection initWithRequest:delegate:] in one method and then releases in connection:didFailWithError: or connectionDidFinishLoading:, but this spits out a bunch of analyzer warnings and ...
- (IBAction)startDownloadingURL:(id)sender
{
// create the request
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/index.html"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
// create the connection with the request
// and start loading the data
...
I want to use the following code to login to a website which returns its cookie information in the following manner:
Set-Cookie: 19231234
Set-Cookie: u2am1342340
Set-Cookie: owwjera
I'm using the following code to log in to the site, but the print statement at the end doesn't output anything about "set-cookie".
On Snow leopard, the li...
It seems dead simple, as to create an NSURLConnection I usually do this:
NSURL *theURL = [NSURL URLWithString:urlString];
NSURLRequest *req = [NSURLRequest requestWithURL:theURL];
NSURLConnection *connection = [NSURLConnection connectionWithRequest:req delegate:self];
But how can I get the URL back in the delegate methods? Short of ha...
I am using this code:
NSURLConnection *oConnection=[[NSURLConnection alloc] initWithRequest:oRequest delegate:self];
to download a file, and I want to update a progress bar on a subview that I load. For that, I use this code:
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
[oReceivedData appendDat...
First, I'm using an NSURLConnection to download JSON data from twitter. Then, I'm using a second NSURLConnection to download corresponding user avatar images (the urls to the images are parsed from the first data download).
For the first data connection, I have my TwitterViewController set as the NSURLConnection delegate. I've created a...
Hi all, I want to download a wav file from a web service, cache it on the iphone and playback it using AVAudioPlayer. Using NSFileHandle and NSURLConnection seems a viable solution when dealing with relatively large files. However, after running the app in the simulator I don't see any saved file under the defined directory (NSHomeDirect...
Hi all, I have a NSURLConnection which is a post to the server, but I expect it to return some small data, whether it was successful or not.
-(void)submitPost:(NSString *)xml
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[service generateURL]];
NSString *result = (NSString *) CFURLCrea...
I'm uploading a file from an iPhone to a server with an HTTP POST, and monitoring the progress in NSURLConnection's connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite. The problem is that the progress is not smooth. The beginning of the file goes by very fast in four 32K chunks, then the progress ticks by more slowly ...
I'm using the following code to submit to a WCF service. I keep getting an error that the key is invalid. I have a webpage on the same server that I submit the same data (but different key) using a FORM POST. It works fine that way. I put the URL below all in a URL (including valid key from server webpage) and get the key is invalid ...
I've been fooling around with code for ages on this one, I would be very grateful if someone could provide a code sample that downloaded this file from a server http://www.archive.org/download/june_high/june_high_512kb.mp4, (By the way it's not actually this file, it's just a perfect example for anyone trying to help me) and then play it...
I want to create a iPhone chat application and i do not have any experience of socket programming so can u please help me understand How can i do long polling from iPhone application?
Also can NSURLConnection be used for this purpose or we need to use some low level API?
Are there any libraries available for the same?
...
I am trying to launch the App Store without launching Safari with all the redirects and I am getting an error about "Request for member 'iTunesURL' in something not a structure or union."
I am new to a lot of this so thank you for being patient with me. I think it has something to do with me calling "self.iTunesURL" since it doesn't th...
I am currently developing an iPhone app, in which involves downloads of up to 300 mb.
I have been told by my hosting service that my server does not support range header requests. However, when I download a file from my server using a download client, like safari download manager, resume options are available and work.
Does this mean ...
I have a PHP script on a server
<?php
// retrieve POST vars
$comment = $_POST['comment'];
$email = $_POST['email'];
// remove trailing whitespace etc
$comment = trim($comment);
$email = trim($email);
// format date accoring to http://www.w3schools.com/php/func_date_date.asp
$date_time = date("Y-m-d-H-i-s"); // i.e. 2010-04-15-09-45-2...
As a disclaimer I'd like to state that I'm fairly new to Objective-C and Cocoa. Currently I'm trying to write a basic application that can POST XML data to a particular endpoint. To achieve this, I've created a ServiceRouter class which uses NSURLConnection to post XML data to a particular URL.
The ServiceRouter class is intended as a ...
Is there a way to reuse SSL socket connections on the iPhone. I'm seeing an extra 3-4 second overhead in doing SSL handshaking. I'm using NSURLconnection currently to do the API calls and each one of them is taking 4-5 seconds on Wifi. Any suggestions would be greatly appreciated.
...
Hello,
I'm a little new to objective-C but have run across a problem that I can't solve, mostly because I'm not sure I am implementing the solution correctly.
I am trying to connect using a Synchronous Connection to a https site with a self-signed certificate. I am getting the
Error Domain=NSURLErrorDomain Code=-1202 "untrusted serve...
Hi everyone!
Does anyone knows if NSURLConnection/NSURLRequest have support for gzip requests.
If does, can you provide more information?
Thanks in advance!
...