• 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: NSUserDefaults and Application Domain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaults and Application Domain


  • Subject: Re: NSUserDefaults and Application Domain
  • From: Adam Leonard <email@hidden>
  • Date: Fri, 5 May 2006 18:06:35 -0700

You can do it with NSUserDefaults too with persistent domains.
Here is an example  (typed in Mail)

NSMutableDictionary *defaults = [[[NSUserDefaults standardUserDefaults]persistantDomainForName:@"[your app identifier]"] mutableCopy];

//mess with the dictionary

[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:@"[app identifier]"];
[[NSUserDefaults standardUserDefaults]setPersistantDomain:defaults forName:@"[app identifier]"];



On May 5, 2006, at 4:43 PM, David Alter wrote:

NSUserDefaults saves the application defaults into ~/Library/ Preference/<application identifier>. Now that is fine in most cases but I'm writing a plugin and I do not want my preferences saves in the applications preferences file. Is there any way to use NSUserDefaults and over ride the <application identifier> so my plugin preferences are saved in their own file?

thanks for the help
-dave


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSUserDefaults and Application Domain (From: David Alter <email@hidden>)

  • Prev by Date: Bindings, a Tableview and an array (Newbie question)
  • Next by Date: Re: NSScrollView flicker
  • Previous by thread: Re: NSUserDefaults and Application Domain
  • Next by thread: Bindings, a Tableview and an array (Newbie question)
  • Index(es):
    • Date
    • Thread