I start new project in Xcode 9 (macOS Game with SceneKit technology). I got storyboard containing NSWindowController with NSWindow and related GameViewController with SCNView. Project runs fine (spins a plane).
Now in storyboard I set Autosave value to "MainWindow" for NSWindow, run project, resize window and then quit. I know that with Autosave set on quit window position will be saved using NSUserDefaults, so I check in Terminal:
$ defaults read com.koati.Bloks ⏎
{
"NSWindow Frame MainWindow" = "415 228 450 322 0 0 1280 777 ";
}
That's expected behaviour. Now I run project once again, but I see that window position is not restored. If in storyboard I remove GameViewController relation, then position is saved and restored correctly, so I suppose that GameViewController somehow influences window size and position.
In older Xcode with XIBs there were no such problem.
EDIT: After some doing some tests, I now think it is not related to SceneKit at all, as replacing SCNView with NSView in NSViewController produces same results. So I think the problem is that NSViewController attached via Storyboard to NSWindow content influences window position and size.
Maybe some one knows how to fix this issue?