I'm using Apple Script to distribute a signed applet, and would like to use a custom icon. However, as soon as I export it from Script Editor, the bundle loses the custom applet.icns file I put in it. It's reverted to the standard script icon (see screenshot).
How do I export my script as an app without losing my custom icon?
If not possible: are there other ways to sign an Apple Script application bundle on OS X 10.10? This would allow me to do a manual icon replacement and sign the bundle afterwards.
Important twist: Replacing the applet.icns file afterwards is not an option, as the bundle won't pass signature validation anymore. In short, users get a damaged app error when launching the app, unless they have lowered their OS X security.