I've created an AppleScript .app file in Script Debugger.app.
I assigned a custom icon to this .app file by pasting a new icon over the default icon in the application's Get Info window in Finder. The custom icon is set immediately.
However, when I open the app in Script Debugger or Script Editor, to edit the code, and then resave the file, the custom icon disappears.
On save, the following icon immediately takes the place of the custom icon:
Of course, having to go through the process of setting the custom icon every time that I save (i.e., edit) the file is an inconvenience.
Is there a way for my custom application icon to remain in place, even after the .app file has been modified?
Here is a similar post:
App made in Applescript; Icon won't change
The answer to the above post gave me the idea to delete the default icon file located at /Contents/Resources/applet.icns
(which I accessed by right-clicking the .app file in Finder and clicking the Show Package Contents context menu item). I then pasted my custom icon into this Resources
folder, and renamed my icon applet.icns
.
The effect of this was a custom icon in informational
dialogs in my AppleScript application, but it did not actually change the actual application icon (i.e., the icon that is inserted into the Dock while the application is running). But, at least this custom dialog icon did remain in place upon re-saving/editing the AppleScript code.