Skip to content

Instantly share code, notes, and snippets.

@timsutton
Created January 11, 2023 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timsutton/9ce2473ec26e07f782f62818415d6a4d to your computer and use it in GitHub Desktop.
Save timsutton/9ce2473ec26e07f782f62818415d6a4d to your computer and use it in GitHub Desktop.
Print out macOS marketing name from SystemDesktopAppearance.framework
#!/usr/bin/env python3
# just a PyObjC example, this of course requires pyobjc also in your python (virtual)env
from Foundation import NSBundle, NSClassFromString
NSBundle.bundleWithPath_("/System/Library/PrivateFrameworks/SystemDesktopAppearance.framework").load()
sda_class = NSClassFromString('SystemDesktopAppearance')
print(sda_class.performSelector_('OSName'))
print(sda_class.performSelector_('OSVersion'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment