iOS Icon Generation
Generate the full AppIcon.appiconset directory (all PNG sizes Apple needs + Contents.json) from a single source logo. Sharp-only — no AI, no API keys, no network calls. Same output as appicon.co, but local and instant.
generate-ios-icons
# Auto-detect logo in Assets/ and write to MobileApp/iosApp/*/Assets.xcassets/AppIcon.appiconset
kappmaker generate-ios-icons
# Explicit source + output
kappmaker generate-ios-icons --source ./Assets/logo.png --output ./path/to/AppIcon.appiconset
# Dark background for transparent logos
kappmaker generate-ios-icons --background "#000000"
Flow
- Resolves source —
--source <path>if given; otherwise auto-detects inAssets/looking forlogo.png,logo_no_bg.png,app_logo.png,app_logo_no_bg.png,icon.png(in that order). Prompts interactively if none found. - Center-crops to a square (warns if source is non-square) and flattens alpha onto
--backgroundcolor. - Resizes via sharp Lanczos to all 11 pixel sizes:
29,40,57,58,60,80,87,114,120,180,1024. - Writes
Contents.jsonmatching appicon.co's schema (12 entries —120.pngis shared by 40pt@3x and 60pt@2x — covering theiphoneidiom @1x/2x/3x plus theios-marketing1024). - Overwrites existing files silently.
Output
Default path follows the KAppMaker convention:
MobileApp/iosApp/<AppName>/Assets.xcassets/AppIcon.appiconset/
├── 29.png
├── 40.png
├── 57.png
├── 58.png
├── 60.png
├── 80.png
├── 87.png
├── 114.png
├── 120.png
├── 180.png
├── 1024.png
└── Contents.json
Falls back to Assets/AppIcon.appiconset/ outside a KAppMaker project. Override with --output <dir>.
Options
| Flag | Description | Default |
|---|---|---|
--source <path> | Source logo PNG (≥ 1024×1024 recommended) | Auto-detect in Assets/ |
--output <dir> | Output AppIcon.appiconset directory | Auto-detect under MobileApp/iosApp/ |
--background <hex> | Flatten color used for transparent logos | #FFFFFF |
Requirements
None — no API keys, no network. Just a source PNG.
Tips
- Chain with
create-logo— generate the logo first, then rungenerate-ios-iconsto mint the full iconset. - Source should be at least 1024×1024 for crisp icons at all sizes. Smaller sources are upscaled (with a warning) and look blurry on iPhone 6.7" displays.
- Apple's App Store requires no transparency on the 1024×1024 marketing icon — the default
#FFFFFFflatten satisfies this regardless of source alpha. Use--background "#000000"(or any hex) for a dark fill if your brand calls for it.