Re: how to reset another app's prefs
Re: how to reset another app's prefs
- Subject: Re: how to reset another app's prefs
- From: Ken Thomases <email@hidden>
- Date: Thu, 20 Nov 2014 16:14:17 -0600
On Nov 20, 2014, at 3:21 PM, Scott Ribe <email@hidden> wrote:
> Now that the system is doing so much caching of preferences, and simply copying prefs files will not get the job done, is there any other way of forcibly setting another app's preferences? (FYI, neither of the apps in question is sandboxed.)
>
> The situation is that an app is accessing a database, tracking events, managing a repository of files, and using AppleScript to drive MS Word to produce certain output. Every once in a while, Word just resets some of its prefs. Every once in a while, it corrupts its prefs. Every once in a while, it wedges itself due to (probably) resource leaks. And so on. So periodically (+ whenever it stops responding) I quit Word, copy preferences files from cached copies I keep that are set the way I want, and relaunch it.
>
> So, any way to for certain replace prefs with a know good set previously saved?
You could use -[NSUserDefaults setPersistentDomain:forName:]. You could also use "defaults import <domain> <path to plist>".
Regards,
Ken
_______________________________________________
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