tencent cloud

Feedback

macOS App Icon ICNS File Generation Guide

Last updated: 2024-06-07 18:06:39

    Overview

    The Apple Icon Image format (. icns) is an .icon format used in macOS. The icons displayed for applications on the macOS Desktop, Finder, and Dock are generated from an .icns file embedded within the app.

    Steps

    1. Prepare a 1024 x 1024 image and rename it to icon.png.
    2. Generate images of different sizes using Terminal
    2.1 Click the Launchpad icon in the Dock.
    
    2.2 Search for Terminal in the search field, then double-click Terminal.
    
    2.3 Create a folder named `icons.iconset` by using the command `mkdir icons.iconset` to store the generated images.
    
    Note:
    Note that the folder name must end with .iconset and should be in the same directory as that of the image file in step 1 to avoid errors during .icns file generation.
    2.4 Run the following commands to generate images of various sizes
    According to Apple’s Human Interface Guidelines, when you create an .icns icon file, you need to prepare .png files in 10 different sizes.
    Copy and paste the following commands into the Terminal, and press Enter to execute the commands.
    sips -z 16 16 icon.png --out icons.iconset/icon_16x16.png
    sips -z 32 32 icon.png --out icons.iconset/icon_16x16@2x.png
    sips -z 32 32 icon.png --out icons.iconset/icon_32x32.png
    sips -z 64 64 icon.png --out icons.iconset/icon_32x32@2x.png
    sips -z 64 64 icon.png --out icons.iconset/icon_64x64.png
    sips -z 128 128 icon.png --out icons.iconset/icon_64x64@2x.png
    sips -z 128 128 icon.png --out icons.iconset/icon_128x128.png
    sips -z 256 256 icon.png --out icons.iconset/icon_128x128@2x.png
    sips -z 256 256 icon.png --out icons.iconset/icon_256x256.png
    sips -z 512 512 icon.png --out icons.iconset/icon_256x256@2x.png
    sips -z 512 512 icon.png --out icons.iconset/icon_512x512.png
    sips -z 1024 1024 icon.png --out icons.iconset/icon_512x512@2x.png
    
    Demonstration:
    
    
    Note:
    Images in multiple sizes can also be provided by designers or generated by other apps.
    3. Use the Terminal tool to generate an.icns icon file.
    Execute the following command in Terminal tool:
    iconutil -c icns icons.iconset -o icons.icns
    Once the command is executed successfully, the.icns file is generated.
    Demonstration:
    
    
    

    Notes

    Image clarity: Ensure that the image remains clear and not blurry at all size.
    Color and transparency: Select appropriate colors and transparent backgrounds so the icon looks good on different backgrounds.
    Copyright: Make sure the images you use are either not copyrighted or that you have permission to use them.

    Conclusions

    By following the steps above, you can easily create your macOS app icon (.icns) files.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support