How to bring NSWindow to front and to the current Space?
To bring your app to the front:
[NSApp activateIgnoringOtherApps:YES];
Swift:
NSApp.activateIgnoringOtherApps(true)
Swift 3:
NSApp.activate(ignoringOtherApps: true)
Perhaps you want:
[self.window setCollectionBehavior: NSWindowCollectionBehaviorCanJoinAllSpaces];
Experiment with the other collection behaviors... I found NSWindowCollectionBehaviorMoveToActiveSpace
was a bit buggy in 10.5 but it might be better now.