Khang
Khang

Reputation: 31

com.apple.dock.plist is changed in macOS14.0 and later

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: enter image description here

But, It has been changed in macOS 14.* enter image description here

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") {
    }
}

Upvotes: 0

Views: 175

Answers (1)

Khang
Khang

Reputation: 31

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

Upvotes: 0

Related Questions