Created
January 11, 2023 22:05
-
-
Save timsutton/9ce2473ec26e07f782f62818415d6a4d to your computer and use it in GitHub Desktop.
Print out macOS marketing name from SystemDesktopAppearance.framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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