Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

CrossConnectivity.Current.IsConnected returns true, even when internet is off only for our app on iphones. #149

Closed
sohail585 opened this issue Apr 10, 2018 · 1 comment

Comments

@sohail585
Copy link

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

image-1

@jamesmontemagno
Copy link
Owner

Expected behavior as iOS still thinks you have internet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants