swift-bundler
swift-bundler copied to clipboard
Add `.icon` (icon composer) icon support
Closes #118
Copilot generated summary:
This pull request adds support for using .icon files (layered icon format) as app icons on Apple platforms, in addition to the existing support for .png and .icns files. It introduces a new LayeredIconCreator utility for converting .icon files to .icns, updates the resource bundling logic to handle these new icon types, and improves the documentation to reflect the expanded icon format support.
Support for new icon formats:
- Added support for using
.iconfiles as app icons on Apple platforms, alongside.pngand.icnsfiles, by updating thecompileAppIconmethod inDarwinBundlerto handle.iconfiles and call the newLayeredIconCreatorutility. [1] [2] [3] - Introduced the
LayeredIconCreatorutility for converting.iconfiles to.icnsusingactool, along with a dedicated error type for handling related errors. [1] [2]
Resource bundling and asset catalog improvements:
- Updated
ResourceBundlerto compile asset catalogs and.iconfiles together when present, refactored parameters to use the fullBundlerContext, and improved handling of temporary files and resource copying. [1] [2] [3] [4] [5] [6] - Added logic to determine the correct target device names for
actoolbased on the Apple platform, ensuring proper icon generation for all supported targets.
Documentation updates:
- Updated the documentation to describe the new supported icon formats and provide guidance on when to use each format. [1] [2]