• 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: Replacing Info.plist programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing Info.plist programmatically


  • Subject: Re: Replacing Info.plist programmatically
  • From: Sherm Pendley <email@hidden>
  • Date: Wed, 22 Nov 2006 13:49:43 -0500

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.

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:?


Anyway, the movePath:toPath:handler: and writeToFile:atomically: calls return NO.

You could implement a handler delegate method fileManager:shouldProceedAfterError: - the second argument should give you more detailed information about the error.


sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


_______________________________________________

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


  • Follow-Ups:
    • Re: Replacing Info.plist programmatically
      • From: leenoori <email@hidden>
    • Re: Replacing Info.plist programmatically
      • From: Claudio Procida <email@hidden>
    • Re: Replacing Info.plist programmatically
      • From: Stephane <email@hidden>
References: 
 >Replacing Info.plist programmatically (From: Claudio Procida <email@hidden>)

  • Prev by Date: Re: Replacing Info.plist programmatically
  • Next by Date: Re: Modal dialog and the close button
  • Previous by thread: Replacing Info.plist programmatically
  • Next by thread: Re: Replacing Info.plist programmatically
  • Index(es):
    • Date
    • Thread