I have the following code to show a new window in my macOS app.
let mainStoryBoard = NSStoryboard(name: NSStoryboard.Name(rawValue: "Main"), bundle: nil)
let windowController = mainStoryBoard.instantiateController(withIdentifier: NSStoryboard.SceneIdentifier(rawValue: "WindowController")) as! NSWindowController
let myController = windowController.window!.contentViewController as! ViewController
myController.imageView.image = mainImage
windowController.showWindow(self)`mainImage` is defined above that.
Problem is this code works perfectly on macOS High Sierra, but on macOS Sierra the window sometimes displays for a split second then disappears.
Why would this work on macOS High Sierra but not macOS Sierra?