• 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: Can an app query the values in its own Info.plist?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Can an app query the values in its own Info.plist?
      • From: Graham Cox <email@hidden>
    • Re: Can an app query the values in its own Info.plist?
      • From: Kyle Sluder <email@hidden>
References: 
 >Can an app query the values in its own Info.plist? (From: Hippo Man <email@hidden>)

  • Prev by Date: Master "addChildObject:" not called when adding child from an array controller !
  • Next by Date: how do i make SecKeyRef object from NSData of publicKey value
  • Previous by thread: Re: Can an app query the values in its own Info.plist?
  • Next by thread: Re: Can an app query the values in its own Info.plist?
  • Index(es):
    • Date
    • Thread