Re: Persistent User Defaults

2018-04-30 Thread 2551phil
Agreed. Only one thing that I didn’t see mentioned yet is that when using 
defaults delete the targeted app should not be running.

> On 30 Apr 2018, at 21:43, Jeremy Hughes  wrote:
> 
> Killing cfprefsd seems unnecessarily drastic. Why not use:
> 
> defaults delete 
> 
> as Gary Wade mentioned earlier?
> 
>  is a reverse-dns string such as “com.company.appname”
> 
> —
> 
>> On 30 Apr 2018, at 15:31, Alex Zavatone  wrote:
>> 
>> Is it worth it (or wise) to zero out preferences and write them prior to 
>> performing a kill?
>> 
>>> On Apr 30, 2018, at 4:52 AM, Nathan Day  wrote:
>>> 
>>> Thats not completely correct modifying the preferences file directly or 
>>> deleting it can take a while for the user defaults process to pick up the 
>>> change, but you can force the user defaults process to pick up the changes 
>>> with
>>> 
>>> killall cfprefsd
>>> 
>>> it can be a little bit complicated sometimes and the process can write out 
>>> changes before you kill it, so sometime you have to kill make you change 
>>> and then kill again.
>>> 
>>> 
>>> 
 On 25 Apr 2018, at 3: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.
>>> 
>>> ___
>>> 
>>> 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/zav%40mac.com
>>> 
>>> This email sent to z...@mac.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/moon.rabbit%40virginmedia.com
>> 
>> This email sent to moon.rab...@virginmedia.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/2551phil%40gmail.com
> 
> This email sent to 2551p...@gmail.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-30 Thread Jeremy Hughes
Killing cfprefsd seems unnecessarily drastic. Why not use:

defaults delete 

as Gary Wade mentioned earlier?

 is a reverse-dns string such as “com.company.appname”

—

> On 30 Apr 2018, at 15:31, Alex Zavatone  wrote:
> 
> Is it worth it (or wise) to zero out preferences and write them prior to 
> performing a kill?
> 
>> On Apr 30, 2018, at 4:52 AM, Nathan Day  wrote:
>> 
>> Thats not completely correct modifying the preferences file directly or 
>> deleting it can take a while for the user defaults process to pick up the 
>> change, but you can force the user defaults process to pick up the changes 
>> with
>> 
>> killall cfprefsd
>> 
>> it can be a little bit complicated sometimes and the process can write out 
>> changes before you kill it, so sometime you have to kill make you change and 
>> then kill again.
>> 
>> 
>> 
>>> On 25 Apr 2018, at 3: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.
>> 
>> ___
>> 
>> 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/zav%40mac.com
>> 
>> This email sent to z...@mac.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/moon.rabbit%40virginmedia.com
> 
> This email sent to moon.rab...@virginmedia.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-30 Thread Alex Zavatone
Is it worth it (or wise) to zero out preferences and write them prior to 
performing a kill?

> On Apr 30, 2018, at 4:52 AM, Nathan Day  wrote:
> 
> Thats not completely correct modifying the preferences file directly or 
> deleting it can take a while for the user defaults process to pick up the 
> change, but you can force the user defaults process to pick up the changes 
> with
> 
> killall cfprefsd
> 
> it can be a little bit complicated sometimes and the process can write out 
> changes before you kill it, so sometime you have to kill make you change and 
> then kill again.
> 
> 
> 
>> On 25 Apr 2018, at 3: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.
> 
> ___
> 
> 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/zav%40mac.com
> 
> This email sent to z...@mac.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-30 Thread Nathan Day
Thats not completely correct modifying the preferences file directly or 
deleting it can take a while for the user defaults process to pick up the 
change, but you can force the user defaults process to pick up the changes with

killall cfprefsd

it can be a little bit complicated sometimes and the process can write out 
changes before you kill it, so sometime you have to kill make you change and 
then kill again.



> On 25 Apr 2018, at 3: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.

___

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