• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: setApplicationIconImage:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setApplicationIconImage:


  • Subject: Re: setApplicationIconImage:
  • From: Uli Kusterer <email@hidden>
  • Date: Thu, 22 Jan 2015 11:43:34 +0100

On 22 Jan 2015, at 08:32, Allan Odgaard <email@hidden> 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@hidden)

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:

This email sent to email@hidden


References: 
 >setApplicationIconImage: (From: "Rick C." <email@hidden>)
 >Re: setApplicationIconImage: (From: Jens Alfke <email@hidden>)
 >Re: setApplicationIconImage: (From: "Rick C." <email@hidden>)
 >Re: setApplicationIconImage: (From: Jens Alfke <email@hidden>)
 >Re: setApplicationIconImage: (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: setApplicationIconImage:
  • Next by Date: Re: setApplicationIconImage:
  • Previous by thread: Re: setApplicationIconImage:
  • Next by thread: Re: setApplicationIconImage:
  • Index(es):
    • Date
    • Thread