Generate macOS app icons from a PNG with Apple HIG compliance. Uses SAP Icons when installed, then applies Apple safe zone (824×824) and squircle mask.
For best results, install SAP Icons:
- Download from Releases
- Install
Icons.appto/Applicationsor~/Applications - The
icons_clibinary is bundled inside the app
# navigate to MacOS-icon-generator folder
# install
uv tool install -e . --forceFrom any macOS project directory:
macos-icon-gen path/to/source.png -p .Options:
-p, --project DIR— Project directory (default: cwd)-o, --output DIR— AppIcon.appiconset path (auto-detected if not set)
The tool finds AppIcon.appiconset in Assets.xcassets or common Xcode layouts.
- Create
Assets.xcassets/AppIcon.appiconsetin your project (Xcode does this automatically for new apps) - Prepare a source PNG (1024×1024 or larger)
- Run:
cd /path/to/your/project
macos-icon-gen path/to/icon.png -p .Output: 16, 32, 64, 128, 256, 512, 1024 px icons in AppIcon.appiconset.
SAP path (if Icons.app installed): icons_cli → install.png → Apple HIG mask → sizes
Post-process: Apple HIG safe zone 824×824 (100px inset), squircle mask, radius scaled to content.
- macOS (uses
sips,swift) - Optional: SAP Icons.app for best output