wakelock_plus icon indicating copy to clipboard operation
wakelock_plus copied to clipboard

Migrate iOS Objective-C version to Swift

Open diegotori opened this issue 3 months ago • 0 comments

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.

As a bonus goal, if we can centralize the Darwin (iOS/MacOS) version into a single location, then we can simplify things further. That would involve creating a base protocol that gets implemented for both MacOS and iOS respectively. Then load up the correct one for each platform via static factory method.

diegotori avatar Oct 07 '25 17:10 diegotori