Skip to content

Connectivity.ConnectivityChanged not fired on iOS #28961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thedee opened this issue Apr 13, 2025 · 3 comments
Open

Connectivity.ConnectivityChanged not fired on iOS #28961

thedee opened this issue Apr 13, 2025 · 3 comments
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info essentials-connectivity p/2 Work that is important, but is currently not scheduled for release platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@thedee
Copy link

thedee commented Apr 13, 2025

Description

Connectivity.ConnectivityChanged event does not fire on iOS devices when you turn off or on the wifi on that device. The device we are using does not have data service.

Also, the NetworkAccess always says Internet regardless of it having internet or not

NetworkAccess accessType = Connectivity.Current.NetworkAccess;
var b = (accessType == NetworkAccess.Internet);

Steps to Reproduce

  1. Create a new project
  2. Override OnStart in App.xaml.cs
  3. Add event handler: Connectivity.Current.ConnectivityChanged += Connectivity_ConnectivityChanged;

Link to public reproduction project repository

No response

Version with bug

9.0.60 SR6

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

@thedee thedee added the t/bug Something isn't working label Apr 13, 2025
@jfversluis jfversluis added area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info essentials-connectivity labels Apr 14, 2025
@jfversluis
Copy link
Member

Does it work if you do it later in the app? Maybe OnStart is too early in the lifecycle.

@jfversluis jfversluis added platform/iOS 🍎 s/needs-info Issue needs more info from the author labels Apr 14, 2025
@thedee
Copy link
Author

thedee commented Apr 14, 2025

Does it work if you do it later in the app? Maybe OnStart is too early in the lifecycle.

@jfversluis no it does not. I put the code into the OnAppearing of the form and it still does not work.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Apr 14, 2025
@tj-devel709 tj-devel709 added the p/2 Work that is important, but is currently not scheduled for release label Apr 17, 2025
@sonny-kava-up
Copy link

We are seeing this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info essentials-connectivity p/2 Work that is important, but is currently not scheduled for release platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants