Hello,
I have the following issue regarding iOS 7.0.4 and iPhone 5s:
When I try to simulate 'online' and 'offline' event by switching the phone to 'Flight mode' it triggers at leas two consecutive events instead just one. So first I got 'offline' event detected and then after 1 second I get 'online' event detected, even if there is a clear evidence that the phone is in 'Flight mode' (airplane icon, and all communication ports shut down). The same issue occurs when I turn off 'Flight mode', so I get at least two events detected instead one.
From my tests it appears that the sequence is as follows:
Turn on 'Flight mode' (phone offline)
1) offline event triggered
2) online event triggered
Turn off 'Flight mode' (phone online):
1) offline event triggered
2) online event triggered
3) offline event triggered
This issue is not present on iPhone 4s.
Do you know a simple solution to remedy this problem? I have local storage variable dependent on that events so app logic is broken down by this issue.