views:

287

answers:

1
+1  A: 

This is the problem:

NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse: &resp error: &err];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];

First you start a synchronous request and then you start the request again but than asynchronous. Makes no sense.

Try removing the first line.

St3fan
Ah, whoops, thanks for that!
Matt