I'm new to macOS programming and recently I started working on this project. Because I needed to share my ViewController
and view with my Safari extension target, I ended up setting the view controller manually in AppDelegate
:
let application = NSApplication.shared()
let initVC = ViewController.viewControllerWithNib()
let window = application.windows.first!
window.windowController?.contentViewController = initVC
window.contentViewController = initVC
window.makeKeyAndOrderFront(nil)
I just left Main.storyboard
to include the application portion since I couldn't figure out how to remove the storyboard and just use a xib as a startup for my application. Curently, I'm getting the following warning:
Window Controller requires a content view controller, main.storyboard
I'm trying to figure out why the app is giving that warning and what's the way to get rid of it.