According to documentation doing:
let alert = NSAlert()
alert.icon = nil
alert.runModally()
should render application's icon. But I get placeholder instead.
According to documentation doing:
let alert = NSAlert()
alert.icon = nil
alert.runModally()
should render application's icon. But I get placeholder instead.
Was just having this same problem. Initially I had only a 256@1x icon and got no icon in the alert. Once I added a 128@1x icon to the AppIcon resource however, the NSAlert displayed it properly.
And no, you don't need to explicitly set the icon to nil.
You can tried some apple built-in icons such as:
alert.icon = NSImage (named: NSImage.cautionName)
Full list of apple icons is here: https://developer.apple.com/documentation/appkit/nsimage/name