Initial Commit

Listen, Learn.

TIL: preserve on which desktop for a Mac app across reboots

Posted at — Jul 30, 2017

I developed a small utility app which has one NSWindow. I usually put it on Desktop 2 (IIRC it was called workspace? But it seems Apple doesn’t do it any more), but when I rebooted the OS, it went to show on Desktop 1, which is a bit annoying. I had failed to find the solution throughout Apple documents and random experiments (well, it turned out I have lame search skill).

Actually, the property that work for it is NSWindow’s isRestorable, settable in Interface Builder as Restorable in the Behavior section of NSWindow.

comments powered by Disqus