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

Re: NSUserDefaults for portable applications


  • Subject: Re: NSUserDefaults for portable applications
  • From: Conor Dearden <email@hidden>
  • Date: Wed, 22 Feb 2006 21:59:25 +0100

> I have just noticed this will still save the preferences in ~/Library/
> Preferences/<bundleIdentifier>.plist in addition to the custom
> location.

There is no reason to remove them from the default location. As you found
out NSUserDefaults automatically saves them there, but upon load you are
loading your portable preferences domain above the user defaults, so
anything on your portable location will override the standard preferences.
By taking a snapshot of the preferences and writing it to the portable
location on application terminate you gain preference portability as well as
the ability of using bindings and the auto save feature in IB. I understand
it's redundant but you lose nothing.

Conor


 _______________________________________________
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

  • Follow-Ups:
    • Re: NSUserDefaults for portable applications
      • From: "David V. Kocher" <email@hidden>
References: 
 >Re: NSUserDefaults for portable applications (From: "David V. Kocher" <email@hidden>)

  • Prev by Date: Re: CFPrefDockItems sample code. Where did it go?
  • Next by Date: Re: NSUserDefaults for portable applications
  • Previous by thread: Re: NSUserDefaults for portable applications
  • Next by thread: Re: NSUserDefaults for portable applications
  • Index(es):
    • Date
    • Thread