Thank you for your reply, JWWalker; your answer nips my question in the bud; it looks like I am doing something that I am not supposed to do. However, in macOS Monterey (before upgrading to Sonoma) I was able to modify the app's preferences plist, restart the app, and it all worked. Something in Sonoma broke what used to work (not surprisingly).
I did recently notice the following error message in the log:
Couldn't read values in CFPrefsPlistSource<0x600000314360> (Domain: com.[domain].[app], User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access
It looks like a sandboxing problem, but I haven't found an option in the app's Xcode project to alleviate the problem (and my knowledge runs shallow there).
Regardless, it looks like it's time to write my own "preferences" class. My app uses Preferences sort of as a mini database (nothing requiring a real SQL DB), and perhaps that's bad use as well. This is for a home-grown, home-use app, so between the sandboxing problem and the possibly inappropriate use of Preferences as a DB, I think I will write my own preferences/store class and make it work how I want and when I want.
Thank you again.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: