wakelock_plus icon indicating copy to clipboard operation
wakelock_plus copied to clipboard

for iOS it donot off the screen even if i disable the wakelockplus

Open DeekanshuSaini opened this issue 1 year ago • 5 comments

I turned off the feature using WakelockPlus.disable(); but it keeps the screen open in iOS.

DeekanshuSaini avatar May 13 '24 13:05 DeekanshuSaini

@diegotori please review this asap

DeekanshuSaini avatar May 13 '24 13:05 DeekanshuSaini

iOS has known issues where it may not keep the screen on (affecting 16.4 and higher). Once I get myself an iOS device, I'm gonna port the code from Insomnia.swift into the iOS platform channel. The emulator may not be ideal for testing the wakelock.

Nevertheless, I do accept and will review PRs related to this. As long as it passes the existing integration tests, then it'll get merged and released.

If you submit a PR to this effect, then you will also have to update wakelock_plus_platform_interface and regenerate the pigeon classes so that they generate Swift instead of Objective-C.

diegotori avatar May 13 '24 13:05 diegotori

@diegotori I have tested this on real device not on simulator , it is working fine in android but in iOS it always keeps the screen awake even if i disable it.

DeekanshuSaini avatar May 13 '24 13:05 DeekanshuSaini

@DeekanshuSaini please read my post. Right now, the legacy Objective-C code isn't cutting it anymore for iOS.

If you happen to port the code in Insomnia.swift, then I'll be happy to review the PR that you make.

diegotori avatar May 13 '24 13:05 diegotori

@diegotori I think his problem is actually that a physical device connected via USB doesn't switch off no matter what. This is likely XCode keeping the device awake unconditionally.

I am trying to find a solution to this problem so I can debug an issue I'm having at the moment.

darajava avatar Sep 14 '24 19:09 darajava