Lisp HUG Maillist Archive

Changing MacOS application icon

Hello,

I’m looking for an example or documentation on how to change the application icon for a delivered MacOS application. I have tried to convert my icon file to a .icns format using an online convertor and replacing the file in the delivered executable, but that did not work for me.

Any suggestions?

—
Burton Samograd

Re: Changing MacOS application icon

> On Jan 17, 2017, at 9:41 PM, BusFactor1 Inc. <busfactor1@gmail.com> wrote:
> 
> Hello,
> 
> I’m looking for an example or documentation on how to change the application icon for a delivered MacOS application. I have tried to convert my icon file to a .icns format using an online convertor and replacing the file in the delivered executable, but that did not work for me.
> 
> Any suggestions?

You did the right thing, but you must also edit <application>/Contents/Info.plist, setting the value of the key CFBundleIconFile to the name of the .icns file, which must be in the directory <application>/Contents/Info.plist.

I don't know if the Finder enforces it, but Apple also requires the icns file to have images of certain sizes in order to comply with their guidelines.

Even after you achieve compliance with all of these rules, you may not necessarily see the new icon in the Finder, as it caches application icons for rendering. Using the touch command on the application bundle might do the trick.



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Updated at: 2020-12-10 08:31 UTC