• 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: Getting another applications preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting another applications preferences


  • Subject: Re: Getting another applications preferences
  • From: Scott Anguish <email@hidden>
  • Date: Sat, 13 Sep 2003 01:58:49 -0400

On Sep 12, 2003, at 11:13 PM, Cory Knapp wrote:

Is there a better way of doing that then just looking at ~/Library/Preferences/Whatever.plist then just opening the file at that location, or is there an Apple sanctioned way of doing this.


Yep, a better way is to use NSUserDefaults persistentDomainForName:, which will return a dictionary containing the preferences for the supplied domain name.

Or, look into CFPreferences.

Also, if your application needs to share defaults with another application, look at the addSuiteNamed: and associated methods in NSUserDefaults.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Getting another applications preferences (From: Cory Knapp <email@hidden>)

  • Prev by Date: Re: Extracting info from notification
  • Next by Date: Re: Extracting info from notification
  • Previous by thread: Getting another applications preferences
  • Next by thread: Extracting info from notification
  • Index(es):
    • Date
    • Thread