• 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 not sticking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaults not sticking


  • Subject: Re: NSUserDefaults not sticking
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 10 Sep 2014 11:23:35 -0500

On Wed, Sep 10, 2014, at 11:15 AM, Todd Heberlein wrote:
> > in the past few years when it's happened it's been an early symptom of filesystem corruption. Sometimes there have been a bunch of leftover temporary lock(?) files in the Preferences directory.
> >
> > If you're getting reports of this from users of your app, it might be worth asking them to run Disk First Aid.
>
> I’ve run into this problem during software development (can’t recall for
> shipping apps). Since it is just during development, I trash the
> preferences file for the app and the problem usually goes away.

Part of the problem might be that you should avoid touching or viewing
the plist files in ~/Library/Preferences. cfprefsd has gotten more and
more aggressive about in-memory caching over the past few years, and the
preferences files might be out of date.

If you want to nuke an app's preferences, use `defaults delete
your.bundle.identifier`. However, in the past that has sometimes not
found the correct container. In that case you might still need to delete
the appropriate plist, but you may need to log out and back in both
before and after doing so to ensure that the changes are picked up by
cfprefsd.

--Kyle Sluder

_______________________________________________

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


References: 
 >NSUserDefaults not sticking (From: "Rick C." <email@hidden>)
 >Re: NSUserDefaults not sticking (From: Graham Cox <email@hidden>)
 >Re: NSUserDefaults not sticking (From: "Rick C." <email@hidden>)
 >Re: NSUserDefaults not sticking (From: Jens Alfke <email@hidden>)
 >Re: NSUserDefaults not sticking (From: Todd Heberlein <email@hidden>)

  • Prev by Date: Re: NSUserDefaults not sticking
  • Next by Date: Re: How to copy Color Panel behaviour?
  • Previous by thread: Re: NSUserDefaults not sticking
  • Next by thread: How to set UILabel height to even multiple of line height with auto-layout?
  • Index(es):
    • Date
    • Thread