Please can we not drop my connection to the game whenever the following happens in iOS?
1. Opening the Multi-tasking Bar.
2. Pulling down the Notification Window.
3. Receiving a "Battery at 20%" popup box.
Thanks!
Printable View
Please can we not drop my connection to the game whenever the following happens in iOS?
1. Opening the Multi-tasking Bar.
2. Pulling down the Notification Window.
3. Receiving a "Battery at 20%" popup box.
Thanks!
It's not me dropping the connection. Apple cuts the connection. If the game drops it's because apple has suspended the application which causes the connection to be cut.
The only time connection failure ever poses more than a extremely minor inconvenience is went I am typing large mails, so I just type them in notes and copy/paste them over, problem solved. : D
Oh yeah, that happened to me the other day. Was super annoying...
But can't you just register the app as a VoIP application and use the setKeepAliveTimeout method to maintain your TCP connection for up to 10 minutes? http://developer.apple.com/library/i...mmingguide.pdf
Or you could even use the beginBackgroundTaskWithExpirationHandler method to ensure the connection is not dropped.
Something like this?
Code:UIBackgroundTaskIdentifier hangTight;
hangTight = [[UIApplicationsharedApplication]
beginBackgroundTaskWithExpirationHandler:^{
/* if you exceed 10 minutes */
}];
[[UIApplication sharedApplication] endBackgroundTask:hangTight];
Well? Have you looked into this tactic?