I'm calling NSURLConnection
-sendSynchronousRequest
in NSOperation, but the method returns immediately. I would expect it to block the operation until all data is received. Is this a misunderstanding on my part?
Asked
Active
Viewed 332 times
0

Srikar Appalaraju
- 71,928
- 54
- 216
- 264

Morrowless
- 6,856
- 11
- 51
- 81
-
1can you provide more info, preferably with code? – Srikar Appalaraju Jun 04 '12 at 10:38
-
Give us your NSOperation code (especially the -main method) to see what you're actually doing. – nverinaud Jun 04 '12 at 11:34
1 Answers
0
set the delegate of the NSURLConnection object to self
and then implement the connectionDidFinishLoading methode
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
-(void)connectionDidFinishLoading:(NSURLConnection *)connection{
//your code
}

touti
- 1,164
- 6
- 18