Display your UI on lock screen.
https://github.com/Lakr233/SkyLightWindow.git
A powerful macOS framework that enables views to be displayed above all other windows using private SkyLight APIs.
.moveToSky() modifier for any SwiftUI viewAdd the following to your Package.swift file:
dependencies: [
.package(url: "https://github.com/Lakr233/SkyLightWindow", from: "1.0.0"),
]
Platform compatibility:
import SwiftUI
import SkyLightWindow
struct ContentView: View {
var body: some View {
Text("This view is always on top!")
.moveToSky()
}
}
You can also create topmost windows programmatically:
import SkyLightWindow
let screen = NSScreen.main!
let view = AnyView(Text("Overlay Content"))
let controller = SkyLightOperator.shared.delegateView(view, toScreen: screen)
// or you can just delegate a window
SkyLightWindow uses macOS's private SkyLight framework to:
โ ๏ธ Privacy & Security: This framework uses private APIs but works without special entitlements and is available to the Mac App Store.
โ ๏ธ System Compatibility: Tested on macOS 11.0+ but may work on earlier versions. Private APIs can change between system updates.
Check out the included example project to see SkyLightWindow in action:
cd Example
open MoveToSky.xcworkspace
This project is licensed under the MIT License. See the LICENSE file for details.