jTribe will be part of Games Mission to Shanghai. http://en.chinajoy.net/
We are looking forward to create great contacts in the Chinese Gaming community.
We will demonstrate some of our new games at the expo and Patrick Dockhorn will be available to meetings at the expo.
As our Touch Board games is quite a success in China we hope of following up with some more games soon.
Wednesday, June 30, 2010
Tuesday, June 22, 2010
Different behaviour in iOS4 for NSError and NSURLConnection
After running some of our apps now on iOS4 we were surprised that there were much more crashes. This little code section is what caused the crashes:
NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:requestStr]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSURLResponse *response;
NSError *error;
NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
if(error) {
NSLog(@"error: %@", [error localizedDescription]);
}
After hours of debugging we could narrow it down to the line of code that initialises the NSError. Setting it to nil did remove the crash. So make sure your code looks like this:
NSError *error = nil;
We are currently investigating more issues we have with code that ran perfectly fine in 3.x and now starts crashing with iOS4. The above line fixed approximately 80% of our problems.
Good luck making your apps ready for iOS4.
Subscribe to:
Posts (Atom)