Set app as regular GUI app to show in Dock
This commit is contained in:
parent
5960c5f7c8
commit
a90a60437b
@ -89,6 +89,11 @@ final class PlayerBridge: ObservableObject {
|
||||
|
||||
// MARK: - 初始化
|
||||
func setup() {
|
||||
#if os(macOS)
|
||||
// 设置为正常 GUI 应用,显示在 Dock 中
|
||||
NSApp.setActivationPolicy(.regular)
|
||||
#endif
|
||||
|
||||
player.volume = volume
|
||||
|
||||
setupTimeObserver()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user