Hi to my fellow SDK developers !
I've just installed XCode Version 3.2.4, in an attempt to upgrade an existing SDK 3 application. After importing my project, editing the project settings and taking care of the infamous "depricated methos" issue, I've tried to run the application but, alas, it crashes after an attempt to get data from a server, using NSURLConnection.
The application works really well on the version 3.1.3. No problem sending and receiving information and I haven't changed ANY of the the code (apart from the dericated methods mentioned above).
here is the code:
Code:
NSMutableURLRequest *request = nil;
request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:strData] cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
if (connection) {
// Create the NSMutableData that will hold
// the received data
self.responseData=[[NSMutableData data] retain];
}
else {
NSLog(@"Connection Failure!");
self.responseData = nil;
}
[request release];
When I copy/paste the strData to the Browser, I get all the information I need. That is, there is nothing wrong on the server side. But I never get any data via my application, i.e. the NSURLConnection delegate methods never get called (not even didFailWithError:) and the application crashes.
Any suggestions? Did anybody encounter this bizarre problem?