• 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 synchronization in Foundation tools
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaults synchronization in Foundation tools


  • Subject: Re: NSUserDefaults synchronization in Foundation tools
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 8 Sep 2009 16:24:33 -0700


On Sep 8, 2009, at 4:13 PM, Sidney San Martín wrote:

"Because this method is automatically invoked at periodic intervals, use this method only if you cannot wait for the automatic synchronization (for example, if your application is about to exit)"

To my knowledge that's always been incorrect — the only time NSUserDefaults synchronizes automatically is upon quit. The app can change a default, stay running for days, then crash; and the default won't have been written to disk so the change is lost. So I've always ended up calling -synchronize myself, either immediately or using a perform-after-delay.


—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSUserDefaults synchronization in Foundation tools
      • From: Ken Ferry <email@hidden>
    • Re: NSUserDefaults synchronization in Foundation tools
      • From: Greg Parker <email@hidden>
References: 
 >NSUserDefaults synchronization in Foundation tools (From: Sidney San Martín <email@hidden>)

  • Prev by Date: NSUserDefaults synchronization in Foundation tools
  • Next by Date: Re: NSUserDefaults synchronization in Foundation tools
  • Previous by thread: NSUserDefaults synchronization in Foundation tools
  • Next by thread: Re: NSUserDefaults synchronization in Foundation tools
  • Index(es):
    • Date
    • Thread