On 22 Jan 2015, at 08:32, Allan Odgaard <[email protected]> wrote: > For this to work, you need to exclude the Info.plist from the app bundle’s > signature.
Sounds like an exploit waiting to happen, though... > If the OP insists on adapting the icon to the current OS version then I > suggest using the existing system for custom icons. > > This works by writing a file named `Icon\r` to the root of the application > bundle and should be easy to simulate in code. A quick test shows no need for > resetting the LS cache, but you do need to relaunch Dock.app (for the dock to > update). AFAIK there’s one more step: You need to set the “custom icon” bit on the .app directory (e.g. using the SetFile command line tool). But yeah, as this is something a user can do on the app in Finder, all this needs is permissions. No leaving a huge gap in your signature (or leaving it away completely — don’t even think about signing again on the user’s machine, that defeats the whole purpose of code signing). But anyway, NSWorkspace has a method for adding custom icons to a file: -setIcon:forFile:options: that would probably be the most convenient to use. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
