Re: Replacing Info.plist programmatically
Re: Replacing Info.plist programmatically
- Subject: Re: Replacing Info.plist programmatically
- From: leenoori <email@hidden>
- Date: Wed, 22 Nov 2006 20:06:39 +0100
El 22/11/2006, a las 19:49, Sherm Pendley escribió:
On Nov 22, 2006, at 1:17 PM, Claudio Procida wrote:
I'm trying to edit the app's Info.plist file programmatically.
The currently logged-in user quite often does not have permission
to do that. For instance, a normal (i.e. non-Admin) user cannot
modify anything in /Applications. What's more, if memory serves, an
app's Info.plist is read at startup and ignored after that, so even
if you could make such changes, you'd need to restart the app (or
jump through other, equally-annoying hoops) to see the results of
the change.
Actually, this smells like an A/B problem. You have problem A, and
you've decided the best solution for it is B (editing Info.plist).
But it's probably not; if you tell us about A, there's probably a
much better solution for that.
Unfortunately, there is no other documented way to hide an
application's dock icon. The only other work around would be to
provide two versions of the application: one which had a hidden icon
and one which didn't.
Even when this hoop-jumping is correctly done with adequate memory
checking, it will be incompatible with Leopard's code signing feature
(http://developer.apple.com/leopard/overview/); how can you change
the plist without breaking the code signature?... (Don't bother
answering, it would no doubt require you to break your NDA.)
The code snippet is the following:
- (IBAction)changeHideDockIcon:(id)sender
If all you want to do is change the Dock icon for your app at run-
time, why not simply use NSApplication's -setApplicationIconImage:?
He doesn't want to change the way it looks; he wants to actually
*hide* it.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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