Reply to Message

View discussion in a popup

Replying to:
WoodyZ
Immortal
Immortal

lrucker wrote: Mac apps don't write to the plist file, they set NSUserDefaults; they have no control over when that gets pushed to the plist and looking in there doesn't tell you what the actual state of the defaults are. That's why I mentioned it above; the different behavior in 10.9 has come up frequently on the Apple devforums.

First of all I'm not using OS X 10.9 Mavericks as a Host nor is everyone else either and regardless prior to OS X 10.9 defaults did write immediately to disk as I can use defaults to set a target VM to start automatically and then immediately open VMware Fusion and the target VM starts.  While this behavior may have changed in OS X 10.9 the write still occurs however the synchronization can occur moments to minutes later.  I've been using defaults to manipulate .plist files for  the last 7 years and have not had any issues although I guess I'll see exactly how things have changed in OS X 10.9 as I start to use it.

As far as NSUserDefaults is concerned saying "Mac apps don't write to the plist file, they set NSUserDefaults;" is antics with semantics and if one does not want to wait then using - (BOOL)synchronize; is probably the way to go.

Reply
0 Kudos