XCode 5: 'Class is not key-value compliant' exception


I’ve been working my way through chapter 1 in XCode 5, and I’ve encountered an issue that I haven’t been able to resolve. So far, I’ve:

  1. Created the project, removed the storyboards, added a xib file with the same name as in the book.
  2. Associated the xib file with the QuizViewController class in the File’s Owner section
  3. Made the main view the QuizViewController.xib
  4. Otherwise followed the book’s code

But I am encountering an exception as follows:

I’ve been browsing around StackOverflow, but haven’t been able to find a solution to my issue. I haven’t used XCode since 3, and it’s all a bit foreign to me coming from Visual Studio. I kind of like having to work through these issues as a learning device, but now I’m stuck! Any help is appreciated!



I was just comparing the XML of my XIB file to the XIB from the example solutions, and they are very different. I assume this has to do with the differences between XCode 4.3 and 5, but I have no idea how to even start fixing it. To the various inspectors in the GUI, the files appear to have all the same properties.


Ok, finally fixed the issue. The problem was twofold:

  1. Missing boilerplate code in QuizAppDelegate.
  2. Having the main view set, instead of leaving it blank.

I took the missing delegate code from the example project.