• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to reset another app's prefs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: how to reset another app's prefs
      • From: Scott Ribe <email@hidden>
References: 
 >how to reset another app's prefs (From: Scott Ribe <email@hidden>)

  • Prev by Date: Adding attributes to text in a text table cell
  • Next by Date: Re: how to reset another app's prefs
  • Previous by thread: how to reset another app's prefs
  • Next by thread: Re: how to reset another app's prefs
  • Index(es):
    • Date
    • Thread