"Unknown class in Interface Builder file" for known existing VC

10,068

Solution 1

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

Ciao!

Solution 2

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.

Share:
10,068
MichelleJS
Author by

MichelleJS

life long learner

Updated on June 04, 2022

Comments

  • MichelleJS
    MichelleJS almost 2 years

    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.

  • MichelleJS
    MichelleJS almost 11 years
    -I did not add any new class to the view controller. It is entire file is almost exactly the same as it was in the old storyboard. I just had to rename a few method calls to properly integrate it into my new project. I am not shure where I need to right click on the storyboards to see any warnings though?
  • Bruno
    Bruno almost 11 years
    On your storyboard right click on any view controller to see the connections inspector, like this d339vfjsz5zott.cloudfront.net/iOS-SDK_GPUImage-Enhanced/2.pn‌​g if you see some connections with a yellow warning you should correct them. Regards, hope I helped :)
  • MichelleJS
    MichelleJS almost 11 years
    I checked all of my view controllers and there are no warnings :(
  • MichelleJS
    MichelleJS almost 11 years
    I'm not sure if it matters but before I cut and pasted my old storyboard view in I had started making a new one (before I realized I was wasting alot of time) and I just deleted it. I then made a new controller on my storyboard, hooked it into my program, added my old storyboard to the project, cut and pasted the old view. I then deleted my old storyboard as well as the old view.
  • MichelleJS
    MichelleJS almost 11 years
    I'm not sure if this is causing a problem or not however everything that I moved into this program from my old program works fine except for one thing. It does not display the correct information from my plist file which is being displayed using the 'unknown class' in question.
  • Bruno
    Bruno almost 11 years
    the 'unknown class' problem may be solved by this stackoverflow.com/questions/1725881/…
  • Bruno
    Bruno almost 11 years
    what type of information do you have on your plist?
  • MichelleJS
    MichelleJS almost 11 years
    I checked your link. It was helpful. My file was missing under BuildPhases -> compile sources. I added it in and the error went away. Thankyou so much.
  • aksh1t
    aksh1t over 10 years
    I wasted 2 hours for this problem and your answer solved it in 10 seconds. Thanks!