[Mac Catalyst] DeviceDisplay.KeepScreenOn not being respected on Mac OS #26059
Labels
area-essentials
Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info
platform/macOS 🍏
macOS / Mac Catalyst
t/bug
Something isn't working
Milestone
Description
We have a Maui app targeting both Windows and MacCatalyst. There is a state the app can be in that requires us to keep the sceen on for the user so the app can function whether the user is at the computer or not.
To facilitate this, we are setting KeepScreenOn on DeviceDisplay:
This is working fine in windows. The Mac build seems to be ignoring this setting completely.
Steps to Reproduce
Make sure your computer is set to sleep in a reasonable amount of time.
In a MacCatalyst maui app, set the
DeviceDisplay.Current.KeepScreenOn
to true.Observe the screen will go to sleep.
Link to public reproduction project repository
https://github.com/DanOrlovsky/MauiBlazorNet9ScreenOnDemo
Version with bug
9.0.0 GA
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
MacOS 14 (Sonoma) and MacOS 15 (Sequoia) and both .Net 8 and .Net 9
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: