kCGWindowWorkspace alternative

Hi,


I would like to get desktop(workspace) number among desktops in macOS.
Since "kCGWindowWorkspace" is deprecated from macOS 10.8, is there an alternative way to enumerate workspace?


Thanks,

YM

That's just a hint.


To list all windows in all workspaces. But in Python.


https://stackoverflow.com/questions/44232433/how-to-list-all-windows-from-all-workspaces-in-python-on-mac


Hope that will give you some hints. And if you succeed to get your goal in Swift, thanks to post the solution here.

Good luck.

kCGWindowWorkspace alternative
 
 
Q