DropletIconRenderer
Enumeration
enum DropletIconRenderer
Type methods
creatorAvatar(inBundleAt:)
static func creatorAvatar(inBundleAt bundleURL: URL) -> NSImage?
The creator's avatar from an installed bundle, or nil when it ships none. The submission rules require one, so nil here means a bundle that predates the rule or was assembled by hand.
icon(inBundleAt:pixelSize:)
static func icon(inBundleAt bundleURL: URL, pixelSize: CGFloat = 512) -> NSImage?
The icon of an installed .droplet bundle, or nil when it ships none.
A bundle carries its Icon Composer document under Contents/Resources as <Name>.icon, which is a directory. Bundle.url(forResource:) finds it by extension without the caller having to know the name the droplet chose.
icon(inBundleAt:style:pixelSize:)
static func icon(inBundleAt bundleURL: URL, style: DroppyIconStyle, pixelSize: CGFloat) -> NSImage?
The icon of an installed .droplet bundle in style, the way the Dock would draw it: Default, Clear or Tinted, light or dark, with the real Liquid Glass of the compiled Icon Composer icon.
Drawn by the system's icon renderer (DroppySystemIconRenderer) from the bundle's Assets.car, which droppykit build has written since 1.6.2 and which carries every appearance. Falls back to icon(inBundleAt:pixelSize:), the Default rendition, before macOS 26, for a bundle built before 1.6.2, or when the renderer draws nothing. Square, flush to the squircle, pixelSize pixels. Blocking; call it off the main thread.
render(documentAt:pixelSize:)
static func render(documentAt url: URL, pixelSize: CGFloat = 512) -> NSImage?
Renders the icon document at url at pixelSize points square.
Returns nil when the document cannot be read; the caller shows the placeholder and reports the validation error separately.