Programmatically access all desktops/workspaces in macOS

Hi, I would like to be able to tell at any time which mission control workspace the user is currently using programmatically on macOS or programmatically check the number of desktops/workspaces are currently created on a macOS screen. I could not find any working answer during my search. Any workspace identifier works for me (uuid, workspace number...). Is there a programmatic way of doing this in Objective C ?

Thank you for the help!

Programmatically access all desktops/workspaces in macOS
 
 
Q