rslifka / vault-zero

Documentation and Issues for the Vault Zero iPad/Apple Silicon app
https://www.vaultzero.app/
MIT License
2 stars 0 forks source link

Add a "prevent screen sleep when using app" option #9

Closed TahoeJimbo closed 1 year ago

TahoeJimbo commented 1 year ago

Monitoring bounties while playing would be easier if my iPad didn't often go to sleep. Instead of users turning off the display sleep system wide, it would be great if Vault Zero did it automatically when the App is running.

The magic you need (afaik) is in the ProcessInfo class, using the beginActivity(options:reason:) and endActivty(_:) using the magic option idleDisplaySleepDisabled.