Skip to content

Conversation

@paulober
Copy link

@paulober paulober commented Dec 23, 2025

Add support for Icon Composer (.icon) app icons

This adds support for Xcode Icon Composer based .icon folders introduced in macOS 26 Tahoe's Liquid Glass design system (see #24132).

Changes

  • Recognize .icon folders: Treats .icon directories as asset catalogs alongside .xcassets
  • "Process"/Detect icon.json files: Handles icon.json metadata files in addition to Contents.json
  • Enable --app-icon flag: .icon-based icons now pass validation and get the --app-icon flag passed to actool
  • Support alternate icons: Works with IncludeAllAppIcons for runtime icon switching

Background

The new .icon format is a folder structure containing:

  • icon.json - Icon metadata (layers, materials, effects)
  • Assets/ subfolder - Vector graphics and image assets

This replaces static .icns files to support Liquid Glass features like translucency, specular lighting, and cross-platform rendering.

Usage

Add .icon folders to your project:

<ItemGroup>
  <ImageAsset Include="Resources\AppIcon.icon\**" />
</ItemGroup>

<PropertyGroup>
  <!-- Optional: Specify which icon to use -->
  <AppIcon>AppIcon</AppIcon>
  
  <!-- Optional: Include all icons for runtime switching -->
  <IncludeAllAppIcons>true</IncludeAllAppIcons>
</PropertyGroup>

The build system will:

  1. Recognize the .icon folder as a valid app icon
  2. Pass it to actool with the --app-icon AppIcon flag
  3. Compile it into Assets.car

Testing

I could not figure out based on the docs how to get it installed locally to test it with my MAUI app. Advices would be appreciated.

@paulober
Copy link
Author

@dotnet-policy-service agree

@paulober paulober marked this pull request as ready for review December 23, 2025 20:26
Copy link
Member

@rolfbjarne rolfbjarne left a comment

Choose a reason for hiding this comment

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

I could not figure out based on the docs how to get it installed locally to test it with my MAUI app. Advices would be appreciated.

Were you able to build the repository locally?

If so, the easiest way is to build your MAUI app using the local build by executing dotnet from the checkout:

cd /path/to/dotnet/macios

# build macios
make all -j8 && make install -j9 

# install the MAUI workload
dotnet workload install maui-ios --skip-manifest-update

# build your project
dotnet build /path/to/your/maui-project.csproj

If you could also add an .icon resource to this test project:

https://github.com/dotnet/macios/tree/main/tests/dotnet/AppWithXCAssets

that would be great!

[Test]
[TestCase (ApplePlatform.iOS)]
[TestCase (ApplePlatform.MacCatalyst)]
[TestCase (ApplePlatform.MacOSX)]
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't work on tvOS?

@rolfbjarne rolfbjarne self-assigned this Dec 29, 2025
@rolfbjarne rolfbjarne added the community Community contribution ❤ label Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Community contribution ❤

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants