Hi there, Currently, we are working on the enterprise project that using data in ~/Library/Preferences/com.apple.dock.plist to get detail design of the original Dock (as autohide, orientation).
It still has been worked until macOS 13.* as description as below:
But, It has been changed in macOS 14.*
Is there any alternative method to do that in macOS 14.* and later?
Unless otherwise documented, system preferences files are not considered API. Relying on them incurs a significant binary compatibility risk. Moreover, when you do run into such problems there may be no path forward. Apple tries to provide a path ford when we change APIs, but we can’t do that for preferences files.
In short, don’t start down that path!
Sadly, it seems that you’re already on that path )-: In this case I think there might be a way forward for you. The Dock has an AppleScript interface that allows you read (at least some of) its preferences. For example:
tell application "System Events"
autohide of dock preferences
end tell
You should experiment to see if this is sufficient to accomplish your goals. If so, you can run this script — or the equivalent Apple events — from your app to get the same values.
IMPORTANT This will trigger a TCC alert, so only do this from a context where that alert makes sense.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"