Re: Programmatically Change Icon
Re: Programmatically Change Icon
- Subject: Re: Programmatically Change Icon
- From: Pierce Freeman <email@hidden>
- Date: Sun, 22 Mar 2009 12:45:27 -0700
- Thread-topic: Programmatically Change Icon
Well, that's what I get for typing this when I was still half asleep. I
meant to simply view instead of changing the icon. Would there be any
problems (legally or otherwise) with doing this? You seem to know about
these issues a lot better them myself...
I definitely agree with all the problems you outlined, and never wanted to
cause problems. If you would mind saying, though, how would changing the
Application's icon involve legal issues? Since the users of the computers
do it all the time. Also I agree that using an application that would
change them without the user's permission would be very disconcerting and I
would probably trash that application right away.
Thanks for your help.
On 3/22/09 10:55 AM, "I. Savant" <email@hidden> wrote:
> On Mar 22, 2009, at 12:27 PM, Pierce Freeman wrote:
>
>> I am wondering if there is some way to change another applications
>> icon
>> programmatically. The problem that I see if that every
>> application's icon
>> name is different and I haven't found a way to read that
>> application's icon
>> location or will just return a NSImage that is the icon.
>
> Problems:
>
> 1 - Not all users are administrators of their computer, and so a user-
> space application may not be able to modify the application bundles in
> question. You'll need to authenticate/authorize the user to perform
> this change if the application is in the /Applications folder, or the
> user has no write permissions for the app bundles otherwise.
>
> 2 - Some applications may be digitally signed, in which case modifying
> the application bundles in question may at least cause disconcerting
> warnings for the user launching the modified applications, and at
> worst break the application(s).
>
> 3 - This may be technically in violation of the EULA of the
> applications in question. IANAL, but I certainly would look into this
> before trying it, especially with the very loosely-defined DMCA laws.
>
> 4 - All the above aside, make sure you have your users' express
> permission to perform this action ... it is a pretty big deal and I
> would personally not use any application that does this, and you can
> count on others feeling the same way, so make sure you ask in very
> clear, plain language.
>
> That said, to get the application's icon, you can do what the
> Finder does and use the app bundle's Info.plist and ask for the value
> for the CFBundleIconFile key. Then ask the application bundle for the
> resource with the returned name.
>
> See the documentation for the permissions issue and for how to work
> with the icon file format.
>
> --
> I.S.
>
>
_______________________________________________
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