5

I am developing an iPhone application that uses NSURLConnection for fetching some network content. My iPhone application should work on iOS >= 4.1

(1) Are the following delegate methods available in all the iOS >= 4.1 including iOS5 (Beta).

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
- (void)connectionDidFinishLoading:(NSURLConnection *)connection;
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error;

The documentation mentions that these methods are 'Available in iOS 2.0 through iOS 4.3' and are listed under the section 'Deprecated NSURLConnection methods' of iOS5 documentation. (However when I command+Click on these methods, are listed under Foundation framework of iOS5.0 Library)

(2) When we call [<NSURLConnection_object> cancel], is the request cancelled immediately OR do we get any callbacks when the request is actually cancelled? Is it safe to release NSURLConnection_object immediately after the call to cancel?

halfer
  • 19,824
  • 17
  • 99
  • 186
spd
  • 2,114
  • 1
  • 29
  • 54

1 Answers1

0

I think they should work and working fine for me. Even they are commented like you said in NSURLConnectionDelegate, they are looking fine in NSURLConnection doc. So I hope they should work. I am saying this because they are working for me in IOS 5.

chown
  • 51,908
  • 16
  • 134
  • 170
Sai Jithendra
  • 439
  • 5
  • 16