Re: NSUserDefaults for portable applications
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