Re: Forcing NSUserDefaults being written to disk?
Re: Forcing NSUserDefaults being written to disk?
- Subject: Re: Forcing NSUserDefaults being written to disk?
- From: Scott Anguish <email@hidden>
- Date: Thu, 9 Jan 2003 04:18:57 -0500
On Wednesday, January 8, 2003, at 03:51 PM, Pierre-Olivier Latour wrote:
Hi,
I have an application that has no UI. Its settings have to be set by
editing
its defaults file (.plist). I use the following code to register the
defaults at startup:
<snip>
My problem is that, even if I call [[NSUserDefaults
standardUserDefaults]
synchronize] when application quits (it returns true), no file is
written in
~/Library/Preferences/;
According to the doc, it should be written when you call synchronize,
even
if no changes have been made to the defaults...
There is likely no domain being specified to use to store the
defaults in. Normally this is picked out of the Info.plist key
CFBundleIdentifier in the application wrapper.
You need to set the identifier in the target of your application..
unless it is a wrapperless tool.. Instead you're going to have to set
the domain programmatically.
PS: I assume synchronize if buggy.
_______________________________________________
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.