Make macos icon persistent even when app is closed

This commit is contained in:
Nicholas Mata
2025-08-14 03:14:35 -07:00
committed by Mitchell Hashimoto
parent 66e5081721
commit 29419e7aac

View File

@@ -119,6 +119,9 @@ class AppDelegate: NSObject,
@Published private(set) var appIcon: NSImage? = nil {
didSet {
NSApplication.shared.applicationIconImage = appIcon
let appPath = Bundle.main.bundlePath
NSWorkspace.shared.setIcon(appIcon, forFile: appPath, options: [])
NSWorkspace.shared.noteFileSystemChanged(appPath)
}
}