Skip to content

anyblades/ios-appiconset-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 sips for image resizing)
  • Python 3
  • Xcode project with an .appiconset directory

Installation

Use directly with npx without installing:

npx @anydigital/ios-appiconset-generator

Or install locally:

npm install @anydigital/ios-appiconset-generator --save-dev

Usage

  1. Navigate to your .appiconset directory:

    cd ios/YourApp/Images.xcassets/AppIcon.appiconset
  2. Run the generator:

    npx @anydigital/ios-appiconset-generator # OR ios-appiconset-generator if installed locally
  3. Optionally, place your source icon image as AppIcon.png in .appiconset directory (1024x1024 recommended) before running the generator.

The script will:

  • Generate all required icon sizes based on Contents.json
  • Automatically update Contents.json with filenames if missing
  • Create a placeholder icon if AppIcon.png doesn'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 ✨

About

Automagically generates all required iOS app icon sizes `.appiconset` from a single provided image for Xcode Asset Catalog `.xcassets` 🥷

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages