XCode snippet for macOS to save the state of current Desktops/Spaces.

Job ID: 30715635

Budget: $30 – $250 USD

Hi,
I need a macOS snippet that saves the list of open apps per mac's Desktop (so called Space) so that I can later reopen a particular Space with all apps (that were open in that space before) with one click.
For example: I have two Spaces/Desktops. In Desktop1 I have a Chrome, TextEditor and XCode open. I want to be able to save the state of that Desktop1 (meaning, currently open apps and ideally their state (like Chrome with a particular www displayed, and TextEditor with a filex.txt opened). Then, I'd like to bring back that Desktop1/Space with all those apps in a particular, saved state.
I prefer Swift-based solution over AppleScript.
Thank you!
Related categories: Mac OS Swift