Load app icon from xcassets on OS X

I can't load another app icon into NSImage. I tried to use both asset name and name of the particular file but image is always nil.

let image = NSImage(named: "Alerted")
//let alertedDog = NSImage(named: "Alerted128x128.png")

image?.size = NSSize(width: 128, height: 128)
NSApp.applicationIconImage = image
NSApp.dockTile.display()

Any thoughts?

In packaged file I see only standard AppIcon.icns and there is no Alerted.icns...


ANSWERS:


There are two types of icons. Additional should be of generic type.



 MORE:


 ? Dock Tile Plug-in not working
 ? Using layer backed NSView as NSDockTile contentView
 ? OSX/Cocoa : get Absolute position of docktile icon in screen
 ? How to use a determinate NSProgressIndicator to check on the progress of NSTask? - Cocoa
 ? How to use a determinate NSProgressIndicator to check on the progress of NSTask? - Cocoa
 ? How to use a determinate NSProgressIndicator to check on the progress of NSTask? - Cocoa
 ? NSTask only returning standardError in release build
 ? NSProgressIndicator in NSStatusItem
 ? NSProgressIndicator in NSStatusItem
 ? NSProgressIndicator in NSStatusItem