• 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: Forcing NSUserDefaults being written to disk?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing NSUserDefaults being written to disk?


  • Subject: Re: Forcing NSUserDefaults being written to disk?
  • From: Pierre-Olivier Latour <email@hidden>
  • Date: Thu, 09 Jan 2003 02:04:16 -0800

> 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.

Unfortunately, there is one and it works, because if I do this before
calling synchronize:

[defaults setBool:[defaults boolForKey:kKey_LogFile] forKey:kKey_LogFile];

A default file is then saved to disk, but contains only the key
kKey_LogFile.

So obviously, synchronize only saves the keys that have been "touched" since
the defaults were registered. That's understandable, but I don't think this
is what the doc says i.e. defaults should be written to disk even if they
have not been updated.

> 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.

Maybe I could workaround the problem with that - who knows... How would you
do this?


_____________________________________________________________

Pierre-Olivier Latour email@hidden
Palo Alto, USA http://www.pol-online.net
_______________________________________________
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.

  • Follow-Ups:
    • Re: Forcing NSUserDefaults being written to disk?
      • From: Chris Parker <email@hidden>
References: 
 >Re: Forcing NSUserDefaults being written to disk? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: "Toll free bridged" types
  • Next by Date: Re: Conceptual problem
  • Previous by thread: Re: Forcing NSUserDefaults being written to disk?
  • Next by thread: Re: Forcing NSUserDefaults being written to disk?
  • Index(es):
    • Date
    • Thread