Preferences file in Sandboxed apps

Trying to modify the preferences of my sandboxed apps outside the app, I noticed that it is not possible anymore under Mavericks to just change the preference (plist) file. Mavericks is using a background task called cfprefsd. cfprefs cashes the preferences of all apps and syncs these prefs with the matching plist found. This is no problem. However, now the plist is only read once at the first start of the app in your OSX session. This means that, even if you quit the app, you still won’t be able to modify preferences through the plist as they are cashed. To overcome this you can do the following:

  1. Quit the app (for which you want to change the plist)
  2. Make the modifications in the plist (for example in What’s Tuned Lite prefs file: ~/Library/Containers/com.plauw.What-s-Tuned-Lite/Data/Library/Preferences/com.plauw.What-s-Tuned-Lite.plist)
  3. Save the plist file
  4. Open the Terminal app and type:
    defaults read ~/Library/Containers/com.plauw.What-s-Tuned-Lite/Data/Library/Preferences/com.plauw.What-s-Tuned-Lite.plist 
  5. (you need to replace 'com.plauw.What-s-Tuned-Lite' with the name of the app for you would like to modify the preferences) 
  6. Press Enter

The shell command defaults read ‘.plist file' will refresh the cashed preferences in background process cfprefsd with the prefs you just modified in the plist. 

© Plauw 2014-2019 - Cookie free website