Notarization wipes the "Icon?" file

In an AppleScript applet, compiling and exporting in Script Editor replaces a custom icon with the default. To retain a custom icon, it is necessary, after exporting, to use Finder's "Get info..." to copy the icon from another file and paste into the icon for the applet. The custom icon is stored in the "Icon?" file, located in the root of the applet bundle. The applet can then be signed and notarized.

With macOS Tahoe, that procedure no longer works. That is because the notarization process now wipes the "Icon?" file. The file remains in place but has zero size. Thus Finder shows the default applet icon.

Does anyone know of a way to provide a custom icon for a signed and notarized AppleScript applet ?

The Get Info procedure is a way to set an icon to something different than is already there.

The normal way to set an icon is to include the icon file in the Resources folder of the application bundle and edit the name in the Info.plist CFBundleIconFile entry. If using Xcode, it has various options to generate and include the icon as part of the build process.

Hi red_menace, Happy New Year.

I don't think it's possible to use Xcode to prepare AppleScript applets – I can find no documentation on how. Have tried wandering/stumbling around in Xcode looking for a way. Nothing found so far.

As mentioned, Script Editor does not respect a custom icon. It's had that bug for many years. Recently, with the macOS 26 release, Script Debugger was hit with the same bug (I believe SD always uses the latest AppleScript binary which I think is partly the cause). I assume that Xcode even if it can be used for exporting AppleScript applets will have the same bug.

Just to be clear, even if a custom icon file is created with the default name, it is ignored and the default icon is shown on the Finder Desktop.

Since my first post I've found that the "Get Info..." method works if done after notarization. In my testing, the applet when downloaded with Safari still runs. This suggests that code signing does not take into account such a change to data stored in the bundle's root folder. Need to do more testing.

Notarization wipes the "Icon?" file
 
 
Q