CrossConnectivity.Current.IsConnected returns true, even when internet is off only for our app on iphones.
sohail585 opened this issue · 1 comments
If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.
Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.
Bug Information
Version Number of Plugin: 3.1.1
Device Tested On: IPhone 6s
Simulator Tested On: IPhone x
Version of VS: 2017 latest version
Version of Xamarin: Xamarin.Forms 2.5.0
Versions of other things you are using:
Steps to reproduce the Behavior
Turn on the main mobile data.
Turn off the mobile data for the particular app on Iphones.( IPhones have this feature).
Now, try calling the method "CrossConnectivity.Current.IsConnected" .
Expected Behavior
it should be returning false(Since, the internet is off for the particular app).
Actual Behavior
It is returning true.
Code snippet
public static bool IsInternetConnectionAvailable()
{
if (CrossConnectivity.Current.IsConnected)
{
return true;
}
else
{
return false;
}
}
Screenshots
Expected behavior as iOS still thinks you have internet