1

enter image description here In the Picture above Mission Control is Launched, and we can see the Space Sequence:

[Mesa 1, Safari, Xcode, Discord, Mesa 2]

How can is possible change this sequence using Swift or Objective-C?

a_kira
  • 195
  • 10

2 Answers2

1

Depends on whether you want to use private API. There are a few github projects that support that functionality.

https://github.com/JulianEberius/qsx/blob/master/src/objc/CGSPrivate.h#L197-L198

https://github.com/lwouis/alt-tab-macos/issues/14

https://github.com/koekeishiya/yabai

This one even says it can do it without private API:

https://github.com/bigbearlabs/SpaceSwitcher

EDIT: as for the last one, I initially misunderstood your question that you want to switch to a different space which is not the actual question (my bad, this is how I found the question). Anyway, the aspect of the answer about using private API still holds. Though you probably will have to dig deep to find how...

lupdidup
  • 181
  • 8
0

For there to be a way to do that, Mission Control would have to have a publicly exposed API. I don't believe that it does and there is no way to accomplish what you are trying to do. You could send a feedback request to Apple and ask them to add that functionality.

Scott Thompson
  • 22,629
  • 4
  • 32
  • 34