5

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
  • 759
  • 3
  • 16
  • 32

2 Answers2

22

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

Ciao!

Michael Rogers
  • 1,318
  • 9
  • 22
3

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.

Bruno
  • 1,032
  • 1
  • 16
  • 40
  • -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? – MichelleJS May 30 '13 at 19:54
  • On your storyboard right click on any view controller to see the connections inspector, like this http://d339vfjsz5zott.cloudfront.net/iOS-SDK_GPUImage-Enhanced/2.png if you see some connections with a yellow warning you should correct them. Regards, hope I helped :) – Bruno May 31 '13 at 09:29
  • I checked all of my view controllers and there are no warnings :( – MichelleJS May 31 '13 at 14:07
  • 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 May 31 '13 at 14:09
  • 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. – MichelleJS May 31 '13 at 16:34
  • 1
    the 'unknown class' problem may be solved by this http://stackoverflow.com/questions/1725881/unknown-class-myclass-in-interface-builder-file-error-at-runtime – Bruno May 31 '13 at 17:00
  • what type of information do you have on your plist? – Bruno May 31 '13 at 17:02
  • 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. – MichelleJS May 31 '13 at 18:16