Skip to content

ka1ne/AppIcon

 
 

Repository files navigation

AppIcon

Build Status platforms GitHub license GitHub release Xcode Swift Swift Package Manager compatible

AppIcon generates *.appiconset contains each resolution image for iOS, MacOS.

AppIcon.appiconset
├── Contents.json
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Demo

Installation

Homebrew

$ brew install Nonchalant/appicon/appicon
$ mint run nonchalant/appicon

Manual

Clone the master branch of the repository, then run make install.

$ git clone https://github.com/Nonchalant/AppIcon.git
$ make install

Usage

AppIcon needs path of base image(.png). The size of base image is 1024x1024 pixel preferably.

$ appicon iTunesIcon-1024x1024.png

Option

You can see options by appicon --help.

--icon-name

Default: AppIcon

--output-path

Default: ./AppIcon.appiconset

--mac

Default: false

--watch

Default: false

Develop

Runs debug build

$ make debug

Runs release build

$ make build

Runs tests

$ make test

Author

Takeshi Ihara [email protected]

AppIcon GitHub Action

This GitHub Action generates app icons for iOS and macOS applications using the AppIcon tool. It can be triggered manually or via a webhook to automatically generate app icons based on a provided image URL.

Usage

You can use this action in your workflow by adding the following step:

- name: Generate App Icons
  uses: ka1ne/AppIcon@v1  # Replace with the latest version
  with:
    icon-source: 'https://example.com/path/to/icon.png'
    output-path: './Assets.xcassets/AppIcon.appiconset'
    icon-name: 'MyAppIcon'
    mac: 'true'
    watch: 'false'

Inputs

  • icon-source (required): Path or URL of the base icon image (1024x1024 PNG)
  • output-path (optional): Path where the generated AppIcon.appiconset will be saved (default: './AppIcon.appiconset')
  • icon-name (optional): Name for the generated icons (default: 'AppIcon')
  • mac (optional): Generate macOS icons (default: 'false')
  • watch (optional): Generate watchOS icons (default: 'false')

Repository Dispatch API Usage

To trigger this action programmatically via GitHub's API, follow these steps:

  1. Create a GitHub Personal Access Token (PAT) with repo scope.

  2. Send a POST request to GitHub's Repository Dispatch API:

curl -X POST \
  -H "Authorization: Bearer YOUR_GITHUB_PAT" \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/{owner}/{repo}/dispatches \
  -d '{
    "event_type": "generate-app-icon",
    "client_payload": {
      "icon_source": "https://example.com/path/to/icon.png"
    }
  }'

The client_payload should contain:

  • icon_source (required): Path or URL to your 1024x1024 PNG icon

Example JSON Payload

{
  "event_type": "generate-app-icon",
  "client_payload": {
    "icon_source": "https://example.com/path/to/icon.png"
  }
}

Note: The other parameters (output_path, icon_name, mac, watch) are configured in the workflow file and cannot be modified via the API payload.

License

Appicon is available under the MIT license. See the LICENSE file for more info.

About

AppIcon generates *.appiconset contains each resolution image for iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 91.4%
  • Makefile 5.9%
  • Dockerfile 2.7%