Welcome to this step-by-step guide on creating app icons in ICNS format for macOS and ICO format for Windows for your Electron application. Whether you’re reviving an old design from .ai or .psd files or starting fresh, this tutorial will help you convert your artwork into formats compatible with both platforms, ensuring a professional look for your app. Let’s dive in!

What You’ll Need

Step 1: Prepare Your Icon Design

Start with your .ai or .psd file, which likely contains your app’s visual identity (e.g., a bullseye with red lines). Export a high-resolution PNG with transparency to use as the source.

Step 2: Create the Iconset Folder

The ICNS format requires multiple image sizes, stored in an icon.iconset folder.

Step 3: Generate Required Sizes

Use the sips command to resize your PNG into the sizes needed for macOS, including Retina variants.

sips -z 16 16     icon-transparent.png --out icon.iconset/icon_16x16.png
sips -z 32 32     icon-transparent.png --out icon.iconset/icon_16x16@2x.png
sips -z 32 32     icon-transparent.png --out icon.iconset/icon_32x32.png
sips -z 64 64     icon-transparent.png --out icon.iconset/icon_32x32@2x.png
sips -z 128 128   icon-transparent.png --out icon.iconset/icon_128x128.png
sips -z 256 256   icon-transparent.png --out icon.iconset/icon_128x128@2x.png
sips -z 256 256   icon-transparent.png --out icon.iconset/icon_256x256.png
sips -z 512 512   icon-transparent.png --out icon.iconset/icon_256x256@2x.png
sips -z 512 512   icon-transparent.png --out icon.iconset/icon_512x512.png
sips -z 1024 1024 icon-transparent.png --out icon.iconset/icon_512x512@2x.png

If you encounter “Error 13,” ensure icon.iconset is a writable folder (use chmod -R u+w icon.iconset if needed).

Step 4: Convert to ICNS

Combine the resized images into a single ICNS file.

iconutil -c icns icon.iconset -o AppIcon.icns

This creates AppIcon.icns in the same directory. Open it in Preview to verify the design and transparency.

Step 5: Integrate into Electron (macOS)

Upload AppIcon.icns to your Replit Electron project and update the build configuration.

Step 6: Create a Windows ICO File

For Windows compatibility, convert your PNG into an ICO file with multiple sizes.

Verify: Open AppIcon.ico in Windows Photos or IrfanView to confirm sizes and transparency.

Step 7: Integrate into Electron (Windows)

Add the ICO to your Electron project for Windows builds.

Tips for Success

With your .ai, .psd, and additional files, this process will give you polished icons for both macOS and Windows Electron apps. Happy designing!

Comments

Approved comments appear below. Log in once with GFAVIP — it applies across the whole site. GFAVIP login

View comments archive