My app working with sdk 4.3 just fine, but when i change to sdk 5.0, every time the screen is locking, after just a few seconds, the tcp connection will disconnect.
I use xmppframework, and it gives me an error like
"Error Domain=NSPOSIXErrorDomain Code=57 The operation couldn’t be completed. Socket is not connected"
It seems that the socket was been closed after screen locking.
Is there something changed in sdk 5.0 case this problem?
Regards.
In iOS 4.x when the user initiated the lock screen the app continued to run in the background. Now in iOS 5.0 when the lock screen is initiated the app is sent to the background and you can only do what an app can do in the background. So if you have not made other arrangements than your app will loose network connections.
Do you have UIRequiresPersistentWiFi specified in your info.plist file? The time it takes iOS to shut down WiFi without this setting may have changed between iOS 4.x and 5.0.
When you lock your iphone or ipad, all the network activities are stopped. Wifi connections are dropped. With what Robin has stated, this would work if the ipad is in idle state and not locked. Since there would be no traffic incoming or outgoing, iPad might decide to drop connection to WiFi.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With