Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unknown class in Interface Builder file" for known existing VC [duplicate]

I am building an app in Xcode 4.6.2 . Everything was working fine until I added a storyboard from a previous version of the project, cut and pasted a view from the old storyboard and then deleted the old storyboard. No I am getting "Unknown class nameOfAnActualClassinMyProject in Intefrace Builder File" . This class a viewController but not the ViewController for the view I just pasted in. I have read alot of questions and answers on this topic and have unsuccessfully made many attempts to fix this. Also I am not using the simulator for this project only the actual iphone.

  • Looked for any inappropriate references in storyboard
  • I have cleaned the app and then built it again
  • I have deleted the app from the phone
  • I have deleted the file which seems to be causing the problem and added it back in.
  • I have reset the phone and reprovisioned (I read one answer where the problem had to do with old files in the simulator.

Also the view from the unknown view controller seems to correctly display.

The app doesn't crash however it displays a warning in the output log. Any help would be appreciated. thanks.

like image 819
MichelleJS Avatar asked May 30 '13 17:05

MichelleJS


2 Answers

Did you check to make sure that your file is being compiled? Click on the Target > Build Phases > Compile Sources.

Ciao!

like image 179
Michael Rogers Avatar answered Nov 13 '22 16:11

Michael Rogers


Did you add any new class to the new view controller, that wasnt on the previous storyboard? Did you right click on each storyboard panel to see if you have any yellow warnings in the connections board?

Regards.

like image 23
Bruno Avatar answered Nov 13 '22 16:11

Bruno