Skip to content

feat: support Icon Composer files as icon input for macOS - #1806

Merged
VerteDinde merged 2 commits into
mainfrom
sam/icon-composer
Aug 4, 2025
Merged

feat: support Icon Composer files as icon input for macOS#1806
VerteDinde merged 2 commits into
mainfrom
sam/icon-composer

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Jul 13, 2025

Copy link
Copy Markdown
Member

Validated locally but impossible to test in CI as it requires Xcode@26 beta.

This adds support for the new Icon Composer icon format in macOS 26 which is required in order to get liquid glass icons. Command for actool was reverse engineered by intercepting xcode's internal build commands and identifying the magic incantation to build icon files correctly.

In order to support both macOS >= 26 and macOS < 26 you must provide icon: ['old.icns', 'new.icon'] as your config, pretty simple tho.

Note for anyone trying this, it requires Xcode@26 but 26b3 is currently busted, you have to use 26b2 or 26b1

@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner July 13, 2025 07:17
@MarshallOfSound
MarshallOfSound force-pushed the sam/icon-composer branch 2 times, most recently from 5ac6ec5 to aedefc8 Compare July 13, 2025 07:40

@dsanders11 dsanders11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is something new that apps are going to need to do to get the Liquid Glass icons in macOS 26, we should try to make this new functionality higher visibility so folks can easily find it.

Should we add it to docs/faq.md? And maybe plan a blog post for more visibility.

@MarshallOfSound

Copy link
Copy Markdown
Member Author

@dsanders11 Worth noting that so far I've only gotten this working with super specific versions of Xcode 26 beta and only on macOS 26 itself.

@malept

malept commented Jul 14, 2025

Copy link
Copy Markdown
Member

Does the CLI work as expected with specifying both old and new macOS icons?

To me, the API change to allow an array feels kinda bad - this might be an impetus to update icon to instead take either a string or a typed object:

export type IconOptions {
  darwin?: string
  // Open to new name, largely a placeholder
  darwinLiquidGlass?: string
  win32?: string
}

export interface Options {
  // ...
  icon?: string | IconOptions
  // ...
}

The advantage to adding an object instead is that it should be automatically parsed by yargs-parser correctly.

@MarshallOfSound

MarshallOfSound commented Jul 14, 2025

Copy link
Copy Markdown
Member Author

Does the CLI work as expected with specifying both old and new macOS icons?

Haven't tested the CLI but assuming it converts multiple incantations to an array of strings it will work just fine. I also thing we don't need the array if we're ok requiring people to do path/to/foo and having foo.icns and foo.icon.

I agree an object is a good end state here, but I think that requires some more careful thought, i.e. darwinLiquidGlass is not good naming, the .icon format is more generic than just lg support

@malept

malept commented Jul 14, 2025

Copy link
Copy Markdown
Member

I agree an object is a good end state here, but I think that requires some more careful thought, i.e. darwinLiquidGlass is not good naming, the .icon format is more generic than just lg support

Yeah, I figured as much but I have no context for what the key should be named, so I deliberately annotated it as a placeholder in the comment.

Comment thread src/icon-composer.ts Outdated
Comment thread src/icon-composer.ts Outdated
Comment thread src/platform.ts
Comment thread src/types.ts
Comment thread src/types.ts Outdated
Comment thread src/win32.ts Outdated
Comment thread src/icon-composer.ts Outdated
@VerteDinde
VerteDinde merged commit ddb4aa6 into main Aug 4, 2025
13 checks passed
@VerteDinde
VerteDinde deleted the sam/icon-composer branch August 4, 2025 21:45
@continuous-auth

Copy link
Copy Markdown

🎉 This PR is included in version 18.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

filiphsps added a commit to filiphsps/plucker that referenced this pull request Jun 2, 2026
macOS 13–25 do not mask app icons, so a full-bleed render shows as a hard
square. macOS 26 masks icons itself (Liquid Glass) and would shrink a
pre-shaped icon. Ship the right asset for each:

- Pre-shaped squircle PNG → the legacy .icns (CFBundleIconFile) for macOS
  13–25. The mask is a superellipse on Apple's 824/1024 icon grid, generated
  by a shared, unit-tested util and applied in the icon app via ?shape=mask.
- Full-bleed art → an Icon Composer .icon compiled to Assets.car with actool
  (mirrors electron/packager#1806), embedded via mac.extraResources +
  CFBundleIconName=Icon for macOS 26 to mask itself.

The Icon Composer step is gated on macOS + actool 26: off-mac or older Xcode
it is skipped and only the legacy .icns ships, so CI and pre-26 hosts degrade
cleanly. Generated icon assets are gitignored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants