Repository navigation
Description
Description
On macOS Tahoe (macOS 26), Uno's native layer (libUnoNativeMac.dylib) calls [NSApp setApplicationIconImage:] at startup, overriding the OS's Liquid Glass dock icon with the default-appearance variant. This causes a visible mid-launch icon flip: the correct appearance-aware icon shows briefly in the dock, then gets replaced by Uno's flat default rendering.
The root cause is that uno_application_set_icon() in the native dylib reads CFBundleIconName from Info.plist, loads the icon via [NSImage imageNamed:] (which returns the default appearance variant without any appearance context), and calls setApplicationIconImage: — clobbering whatever macOS had already set from Assets.car with full dark/tinted/clear appearance support.
Steps to Reproduce
- Create a Uno Skia Desktop app targeting
net9.0-desktopwithosx-arm64 - Add
<UnoIcon Include="Assets/Icons/icon.png" />to csproj - Build with
dotnet publish -p:PackageFormat=appon macOS Tahoe - The generated
.appbundle hasCFBundleIconNamein Info.plist andAssets.carin Resources - Launch the app
- Observe the dock icon: correct Liquid Glass variant appears briefly, then flips to the default/flat variant
Expected Behavior
The dock icon should remain as the OS rendered it from Assets.car — respecting the user's appearance mode (light, dark, tinted, clear). Uno should not override the dock icon at runtime.
Actual Behavior
libUnoNativeMac.dylib calls [NSApp setApplicationIconImage:] with the default-appearance variant from [NSImage imageNamed:], replacing the Liquid Glass icon with a flat rendering. Visible as a mid-launch flip.
Workaround
Strip CFBundleIconName from Info.plist AND remove Assets.car from the shipped bundle. This prevents Uno's native lookup from finding anything to override with. The dock icon then falls back to CFBundleIconFile → classic .icns, which macOS renders without Uno interference.
Downside: losing Assets.car means no Liquid Glass appearance variants at all — users on Tahoe with dark/tinted/clear modes see only the default colored icon.
For Mac App Store builds this workaround is not viable because Apple requires Assets.car (ITMS-90546).
Suggested Fix
One of:
-
Don't call
setApplicationIconImage:at all — let macOS handle the dock icon entirely from the bundle'sAssets.car/CFBundleIconName. The only reason to call it would be runtime icon changes, which desktop apps rarely need. -
Use an appearance-aware API — if Uno must set the icon programmatically, use an API that respects the current
NSAppearancecontext rather than[NSImage imageNamed:]which returns the default variant. -
Add an opt-out — a csproj property like
<UnoMacOSSetApplicationIcon>false</UnoMacOSSetApplicationIcon>so developers can disable the runtime override when they want the OS to handle the icon.
Environment
- Uno.Sdk: 6.5.31
- .NET: 9.0, TFM
net9.0-desktop - macOS: Tahoe (26) on Apple Silicon (osx-arm64)
- Xcode: 26.x
- Observed on both
PackageFormat=appandPackageFormat=dmgoutputs
Investigation Notes
We traced this through five layers before identifying libUnoNativeMac.dylib → uno_application_set_icon() → [NSApp setApplicationIconImage:] as the root cause:
CFBundleIconName+Assets.car— Uno's[NSImage imageNamed:]returns default variantAssets.xcassets/resizetizer output inContents/MacOS/— stripped, didn't fix aloneAssets/Icons/*.scale-*.png— stripped, didn't fix alone<UnoIcon>csproj item — was a red herring; Package.appxmanifest overrode itPackage.appxmanifest— deleting it AND removing UnoIcon finally stopped the flip, but at the cost of losing all icon support from Uno's build system
Activity
spouliot commentedon Apr 30, 2026
@ajpinedam there is
is_bundleflag that should be used to keep the current behaviour for non bundled apps (including development) to avoid the default executable icon.Otherwise, if a bundle is present, all the information should be present for macOS to do the right thing.