Controlling the Dock with CoreDock

by Wolfgang BairdFEB 23, 2021

Controlling the Dock with CoreDock

While experimenting with controlling the Dock working on cDock, one thing I wanted to replicate was the ability to change some dock settings easily without restarting the Dock.

System preferences has about 10 settings that can be toggled and instantly applied and conveniently these are set using CoreDock which we can use by linking with  ApplicationServices.framework and including a header with definitions of the external methods.

There was unfortunately very poor documentation on the CoreDock methods available online and even knowing exactly what to search I couldn't find a full documentation of all the methods.

What I was able to eventually come up with was a combination of several existing partial documentations from the links below and my own debugging with With the following header file you can control all the same settings as you can in the System Preferences pane as well as get some basic info about the Dock and it's location without using AXUIElements.