Help Creating a XIB only Project

Hello,


I'm trying to create a XIB based application in XCode 8.3 but the option to Start a project without a Storyboard has been removed. Here are the steps I am taking to set up my project:


1. Create a new Cocoa Application.

2. Delete Main.Storyboard

3. Delete ViewController.swift

4. Add a new file to the project - a Cocoa Class - subclass of NSWindowController, Also create XIB file checked - named MainWindowController

5. Under General project info- delete reference to Main for Main Interface

6. in app delegate:

add var mainWindowController: NSWindowController?

in applicationDidFinishLaunching add


let mainWindowController = MainWindowController(windowNibname: "MainWindowController")


mainWindowController.showWindow(self)


self.mainWindowController = mainWindowController


7. in project preferences under the info section add

Main nib file base name MainWindowController


This does display my window when I run it however, i get the error:


Failed to connect (window) outlet from (NSApplication) to (NSWindow): missing setter or instance variable

and if I add any controls and connect them i get a similar error stating they couldn't be connected.


I am trying to follow along with Big Nerd Ranch's book "Cocoa Programming for OS X" and most of the projects do not use storyboards.

Please Help!


Phil

I would find a sample that uses Storyboards...that might not be the only example/project from that book that is outdated and give you issues w/current tools.


Alternatively, try an older Xcode, such as 7.3.1 to see if it will still do what you want, here: https://developer.apple.com/download/more/


Be sure to contact the people that received the money you paid for that book, for support. It's not fair for us to carry that load for them while they're off the hook 😉


Good luck.


Ken

I had someone help me with this a few weeks ago, see if this thread helps you:

https://forums.developer.apple.com/thread/74868

Help Creating a XIB only Project
 
 
Q