Re: Preferences caching?
Re: Preferences caching?
- Subject: Re: Preferences caching?
- From: David Duncan <email@hidden>
- Date: Wed, 27 Nov 2013 14:18:04 -0500
The preferences file has always been considered an implementation detail. I'm not up on all the reasons for the change, but you should be able to use the 'defaults' command line tool to do the same thing that trashing prefs used to do. Something like 'defaults delete com.yourcompany.yourapp' should do the trick.
--
David Duncan @ My iPhone
> On Nov 27, 2013, at 2:02 PM, Graham Cox <email@hidden> wrote:
>
> Apparently, OS X 10.9 caches preference files. This is the first I’ve heard about it (on a discussion on Ars Technica of all places). Is there any documentation about this, like an explanation as to what purpose this has?
>
> I noticed recently that after deleting my app’s prefs file, I was still getting an old value coming up, despite changing it in the defaults plist I use with -registerDefaults: on startup. I was unable to track down where this old value was coming from, and gave up, baffled, since it was only a curiosity in that case. Now I know why. However, if something really seriously does need changing, then this caching means I’m not going to be able to test it without writing code to forcibly update the user defaults, rather than just passively changing the value in my plist and trashing the prefs file. That’s a pretty major problem.
>
> Also, very rarely, but once in a while, deleting the prefs file can be a useful solution to get a user around a problem due to a bug, etc. If that’s no longer an option, we are going to be stuck with bugs that are going to be very hard to triage in the field. That’s a pretty major problem.
>
> Please someone tell me there’s a way to opt out of this travesty? At this rate I’ll be writing a full-on replacement for NSUserDefaults just to get back the behaviour it’s always had in the past. What good is this change anyway?
>
> ―Graham
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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