You definitely don't want to call out to a separate process. You can get this value from UserDefaults.standard.persistentDomain(forName: "com.apple.universalaccess"). Combine that with NSCursor.current.image.size to get the visible size.
However, this isn't really an API. The old army joke goes, "If the army had wanted you to have a wife, we would have issued you one." Apple is the same. If Apple had wanted you to have a given piece of data, they would have given you an API. If you have to use hand-coded string, and query values that aren't documented and don't have enum definitions, you're taking a risk.
That being said, it does seem to work, and in a sandboxed app no less. But it looks like it would be forbidden in the Mac App Store. Any use of UserDefaults requires a privacy manifest for NSPrivacyAccessedAPICategoryUserDefaults and there isn't an entry in the reasons list for reading accessibilty settings.
Personally, I wouldn't bother with it. Don't forget the corrolary to the previous joke, "If Apple really cared about accessibility, they would have given you a decent API".
Topic:
Accessibility & Inclusion
SubTopic:
General
Tags: