Re: Can an app query the values in its own Info.plist?
Re: Can an app query the values in its own Info.plist?
- Subject: Re: Can an app query the values in its own Info.plist?
- From: Kiel Gillard <email@hidden>
- Date: Mon, 28 Sep 2009 13:47:26 +1000
<http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSBundle_Class/Reference/Reference.html#//apple_ref/occ/instm/NSBundle/infoDictionary
>
Generally one does not put custom keys in the Info.plist. You might
want to consider a separate plist resource for your target and use
NSBundle's pathForResource:ofType: method to query the dictionary at
the resulting path. For more information see: <http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSBundle_Class/Reference/Reference.html#//apple_ref/occ/instm/NSBundle/pathForResource:ofType:
>
Kiel
On 28/09/2009, at 1:33 PM, Hippo Man wrote:
Is there a way for me to put my own, custom key into a Cocoa
application's Info.plist and have the application query that key's
setting?
I know that I can use the dictionaryWithContentsOfFile: method of an
NSDictionary to read an arbitrary, dictionary-like property list,
given its pathname. However, I'm wondering if there's a way to
automatically get one or more settings in the current Cocoa
application's Info.plist without knowing anything about its pathname.
In other words, I want to query settings from "my" Info.plist.
Is this possible? If so, could someone point me to some docs which
describe how to do this?
Thanks in advance.
--
HippoMan <email@hidden>
_______________________________________________
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
_______________________________________________
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