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?
Code I used to get:
if let defaults = UserDefaults(suiteName: "com.apple.dock"),
let orientation = defaults.string(forKey: "orientation") {
}
}
I get this Apple Script can help me. My bad that I dont seek for the Apple Scripts for more.
tell application "System Events" to set dockProperties to screen edge of dock preferences