In our iPhone application we have a situation when the current network is lost (Wi-Fi) and we need to switch to another network (GPRS).
We're handling this situation using Reachability API of iPhone SDK 4.x
Everything works fine, except the background mode - reachability callback is not being invoked in the background mode.
Does anyone know the solution to this problem? How to handle the lost connections in the background mode?
Please note - we're using "VoIP" flag for the background mode and the keep-alive timer with 600 seconds period. So our application responds to all incoming calls in the background mode + sends successfully SIP REGISTER messages every 600 seconds as well.
The only remaining problem is about the re-connections upon the network change in the background mode. Reachability callback does not help to listen to such kind of changes. And waiting until the next cycle of background timer (up to 600 seconds) is not acceptable, because the user won't be able to accept any incoming calls during this period.
Please advise.