That’s a great idea.

For a Mac app, I suppose.

I wonder if a simple change in the bundle where you have the icon file be 
symlink to a folder in the app’s documents folder and then change that file?

What if you issue a shell script to restart the Dock?  

What happens if you change the icon manually through get info?  Can you 
duplicate your app, change the icon manually and diff the two apps to see where 
the differences are?  Then change the icon using NSWorkspace and compare the 
difference.

It surprises me that NSWorkspace breaks code signing.

Let me see what I can look in to.

Cheers,
Alex Zavatone

> On Mar 22, 2024, at 8:23 AM, Mark Allan via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> Hi all,
> 
> I'm trying to offer my users the option (via a pre-defined list in my app's 
> Preferences) to choose an app icon which shows up in the Dock and the Finder.
> 
> Updating the Dock tile whilst the app is running is fairly simple to achieve, 
> but I also want the Dock icon and Finder icons to remain customised even when 
> the app isn't running. 
> 
> I have the following 
>       [[NSWorkspace sharedWorkspace] setIcon:newAppIcon forFile:[[NSBundle 
> mainBundle] bundlePath] options:0];
> 
> This works, but has the unfortunate side-effect of breaking code signing!
> 
> Can anyone help with this please?
> 
> The folks at Panic have managed to do it with Nova, so it must be possible, I 
> just can't figure it out.
> 
> Thanks
> Mark
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to