@anydigital/ios-appiconset-generator
v1.0.1
Published
Generate iOS app icons from a source image for Xcode asset catalogs
Maintainers
Readme
ios-appiconset-generator
Automagically generates all required iOS app icon sizes .appiconset from a single provided image for Xcode Asset Catalog .xcassets.
Requirements
- macOS (uses
sipsfor image resizing) - Python 3
- Xcode project with an
.appiconsetdirectory
Installation
Use directly with npx without installing:
npx @anydigital/ios-appiconset-generatorOr install locally:
npm install @anydigital/ios-appiconset-generator --save-devUsage
Navigate to your
.appiconsetdirectory:cd ios/YourApp/Images.xcassets/AppIcon.appiconsetRun the generator:
npx @anydigital/ios-appiconset-generator # OR ios-appiconset-generator if installed locallyOptionally, place your source icon image as
AppIcon.pngin.appiconsetdirectory (1024x1024 recommended) before running the generator.
The script will:
- Generate all required icon sizes based on
Contents.json - Automatically update
Contents.jsonwith filenames if missing - Create a placeholder icon if
AppIcon.pngdoesn't exist
How it works
The tool reads your Contents.json file, extracts the required icon sizes and scales, and uses macOS's sips utility to generate properly sized PNG files. It preserves the Xcode formatting of Contents.json when updating filenames.
Feedback?
https://www.reddit.com/r/TricksForGeeks/comments/1pnnpwu/iosappiconsetgenerator/
✨ found this useful? → give a star on GitHub or simply join TricksForGeeks on Reddit for more ✨
