I am trying to use the Xamarin Essentials Connectivity events for iOS in a Xamarin Forms solution and when I register the event (Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged) it fires as expected when I disable the internet connection. It hits the handler and all is good.
However, the issue is when I re-enable the internet connection, nothing happens. No event is fired.
Also worth mentioning is that the only time the event is fired is when I first launch the app in a connected state and transition to a disconnected state.
If I launch the app in a disconnected state and transition to a connected state, no event is fired.
Event should be triggered when we lose and internet connection, and when the internet connection is re-established.
Only the FIRST disconnect event is triggered and thereafter, no other connection or disconnect events are triggered.
Are you putting your mac into airplane mode to simulate this? I just tested this out on my iPhone 6 and was not able to reproduce it.
Hey James, thanks for the info. I was testing this using the iOS simulator and the network link conditioner. In additional to the link conditioner, I also tried disabling wifi and re-enabling it. I will try it on the physical device as well. If that is the only option, it should do, but it would be nice for it to work with the iOS simulator.
The iOS simulator is not an accurate representation of some of the APIs because it is just a simulator and not an emulator.
Closing as we are unable to reproduce on physical devices.