Giter Site home page Giter Site logo

icon-asset-util's Introduction

โš ๏ธ This will be deprecated since Xcode 14 allows a single 1024x1024 icon asset which gets scaled automatically.

Icon Asset Utility

This script allows you to create iOS App Icon Assets which can be dragged directly into Xcode.

Additionally you can remove the alpha channel of every PNG in a specific directory.

This is especially useful for iOS App Icon Assets which require the alpha channel to be removed in order to be accepted by App Store Connect. Many applications like Figma export PNGs with alpha channel by default with no easy way to disable it.

The workaround would be to open each exported PNG in Preview and export it again with the "Alpha Channel" option unchecked.

1. Installation

1.1 Install permanently (recommended)

To install this script permanently just put it in your /usr/local/bin/ directory.

$ sudo cp icon-asset-util /usr/local/bin/icon-asset-util

Now it can be used globally just by calling

$ icon-asset-util [options]

1.2 Use in your own location

You can also put it wherever you want and use it like this:

$ path-to-script/icon-asset-util [options]

2. Usage

2.1 Create App Icon Set

To create an Asset Catalog simply put any input PNG in a convenient location and from there call

$ icon-asset-util -a your-icon.png

This will create an 'AppIcon.appiconset' folder with all the required sizes inside. It also creates a 'Content.json' file so you can just drag the whole folder into your Xcode projects Assets Catalog.

2.2 Remove Alpha Channel

If you already have your icons in all the required sizes, but you encounter an error when uploading to App Store Connect, that the App Icon must not have an alpha channel, navigate to your asset folder inside your Xcode project and run the following command

$ icon-asset-util -r .

Or provide the path to the asset folder as an argument

$ icon-asset-util -r path-to-directory

3. Changelog

Version 2.0

  • Important: Script was renamed to icon-asset-util
  • Important: Syntax changed (see current Syntax above)
  • Create App Icon Sets

Version 1.2

  • Ommitted .sh file extension

Version 1.1

  • Show status when converting
  • Display success message on completion

Version 1.0

  • Remove the alpha channel of all PNGs in a folder

icon-asset-util's People

Contributors

lukepistrol avatar

Stargazers

Thomas Harr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.