Skip to content
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

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

Open
DeekanshuSaini opened this issue May 13, 2024 · 4 comments
Open

Comments

@DeekanshuSaini
Copy link

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

@DeekanshuSaini
Copy link
Author

@diegotori please review this asap

@diegotori
Copy link
Collaborator

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.

@DeekanshuSaini
Copy link
Author

@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.

@diegotori
Copy link
Collaborator

@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.

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

No branches or pull requests

2 participants