Hello.
Our app uses WiFi to communicate with VoIP server (in both fore- and background), periodically connecting to a dedicated server asking for data updates. The problem occurs only when WiFi doesn't have Internet connectivity and Cell data may have one. It's been noticed that VoIP server connection can't be established sporadically (in some cases - periodically, approx. once per minute) with different error event codes reported.
We've added use of Reachability notifications to monitor:
- WiFi connectivity (using reachabilityForLocalWiFi reachability instance)
- Server host reachability (using reachabilityWithAddress reachability instance)
Both instances' network status is verified upon receiving ReachabilityChangedNotification.
On some devices (iPhone 5s, iOS 8.3) the following happens periodically:
- Wifi NotReachable status is returned by reachabilityForLocalWiFi instance
- Host is ReachableViaWWAN status is returned by reachabilityWithAddress instance
Within a couple of seconds notification handler is called again with same WiFi state, but Host is ReachableViaWiFi. The entire sequemce cycles periodically (approx. once per minute).
- Is there a reasonable explanation of such behavior on iOS part, i.e. what could be causing intermittent Host reachability "jumping" to WWAN and back?
- Is there a way to force App to stick to WiFi connection without swithing to WWAN?
Thanks in advance,
Alex