xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.52k stars 505 forks source link

OrientationSensor on iOS does not work when Location Services are off. #2122

Closed robheffo79 closed 9 months ago

robheffo79 commented 9 months ago

Description

OrientationSensor in iOS does not fire events due to an underlying issue where the sensor is intialised in such a way as it has a dependency on the Compass Calibration, and thus a dependency on location services.

Steps to Reproduce

  1. Attempt to enable the OrientationSensor on iOS
  2. Wait for an event that never comes.

Expected Behavior

You expect the ReadingChanged event to start firing as the orientation of the device changes.

Actual Behavior

You do not get a ReadingChanged event to fire as the orientation of the device changes.

References

https://github.com/xamarin/Essentials/issues/1473

jfversluis commented 9 months ago

See https://github.com/xamarin/Essentials/pull/2123#issuecomment-1923452692