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

Re: Replacing NSUserDefaults


  • Subject: Re: Replacing NSUserDefaults
  • From: Stéphane Sudre <email@hidden>
  • Date: Tue, 24 Jul 2001 11:31:28 +0200

On mardi, juillet 24, 2001, at 09:28 AM, Rosyna wrote:

Is it possible to set a NSDictionary back into NSUserDefaults and have it replace ALL keys and values currently in NSUserDefaults?

My goal is to save the Defaults to a dictionary, change some things in the Defaults, then restore the defaults to their old values.

While it's not a good solution, maybe this could work:

[myDictionary writeToFile:[[[NSHomeDirectory() stringByAppendingString:@"/Library/Preferences/"]
stringByAppendingString:[[[NSBundle mainBundle] infoDictionary] valueForKeyPath:@"CFBundleIdentifier"]] atomically:YES];


  • Follow-Ups:
    • Re: Replacing NSUserDefaults
      • From: David Remahl <email@hidden>
References: 
 >Replacing NSUserDefaults (From: Rosyna <email@hidden>)

  • Prev by Date: Replacing NSUserDefaults
  • Next by Date: SOAP-XML
  • Previous by thread: Replacing NSUserDefaults
  • Next by thread: Re: Replacing NSUserDefaults
  • Index(es):
    • Date
    • Thread