Re: Persistent User Defaults

2018-04-24 Thread Jack Brindle
One thing further. The defaults are set in the program, and changes are written 
to the plist when they first differ from the set defaults. This can be very 
confusing since many folks expect to see all defaults in the file and are 
surprised to see only a few. Interestingly it appears that if they are changed 
back the change is still written to the plist so that over time you may get the 
entire set there.

- Jack


> On Apr 24, 2018, at 8:51 AM, Rob Petrovec  wrote:
> 
> 
> 
>> On Apr 24, 2018, at 11:42 AM, Richard Charles  wrote:
>> 
>> On macOS an applications user defaults are stored in a preference plist file 
>> located in ~/Library/Preferences.
>   Thats not entirely accurate.  They can be in various locations, 
> including but not limited to ~/Library/Preferences/ByHost, 
> /Library/Preferences & /Library/Preferences/ByHost
> 
> 
>> If this file is deleted, user preferences for the application still persist 
>> until the machine is rebooted. In other words if you want to start with a 
>> clean set of user preferences not only must you delete the preference plist 
>> file but you must also restart the machine.
>> 
>> Can anyone shed light on this behavior?
>   You should use the ‘defaults’ command in Terminal to do modifications 
> like this (see 'man defaults’ for more info).  It will cause CFPreferences to 
> reload the prefs for the effected app automagically.  If you want to blow 
> away all the prefs for an app use ‘defaults delete ’.  
> If you want to load a pre-configured .plist use 'defaults import  identifier string> ’.
> 
> Hope that helps.
> 
> —Rob
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/jackbrindle%40me.com
> 
> This email sent to jackbrin...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Persistent User Defaults

2018-04-24 Thread Rob Petrovec


> On Apr 24, 2018, at 11:42 AM, Richard Charles  wrote:
> 
> On macOS an applications user defaults are stored in a preference plist file 
> located in ~/Library/Preferences.
Thats not entirely accurate.  They can be in various locations, 
including but not limited to ~/Library/Preferences/ByHost, /Library/Preferences 
& /Library/Preferences/ByHost


> If this file is deleted, user preferences for the application still persist 
> until the machine is rebooted. In other words if you want to start with a 
> clean set of user preferences not only must you delete the preference plist 
> file but you must also restart the machine.
> 
> Can anyone shed light on this behavior?
You should use the ‘defaults’ command in Terminal to do modifications 
like this (see 'man defaults’ for more info).  It will cause CFPreferences to 
reload the prefs for the effected app automagically.  If you want to blow away 
all the prefs for an app use ‘defaults delete ’.  If you 
want to load a pre-configured .plist use 'defaults import  ’.

Hope that helps.

—Rob



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Persistent User Defaults

2018-04-24 Thread Gary L. Wade
Try defaults delete in the Terminal.
--
Gary L. Wade
http://www.garywade.com/

> On Apr 24, 2018, at 8:42 AM, Richard Charles  wrote:
> 
> On macOS an applications user defaults are stored in a preference plist file 
> located in ~/Library/Preferences.
> 
> If this file is deleted, user preferences for the application still persist 
> until the machine is rebooted. In other words if you want to start with a 
> clean set of user preferences not only must you delete the preference plist 
> file but you must also restart the machine.
> 
> Can anyone shed light on this behavior?
> 
> --Richard Charles
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Persistent User Defaults

2018-04-24 Thread Richard Charles
On macOS an applications user defaults are stored in a preference plist file 
located in ~/Library/Preferences.

If this file is deleted, user preferences for the application still persist 
until the machine is rebooted. In other words if you want to start with a clean 
set of user preferences not only must you delete the preference plist file but 
you must also restart the machine.

Can anyone shed light on this behavior?

--Richard Charles

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com