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

I am creating an application in Xcode 4.6.2. Everything worked fine until I added the storyboard from the previous version of the project, cut and pasted the view from the old storyboard, and then deleted the old storyboard. No. I get "Unknown class name ofOfAnActualClassinMyProject in the Intefrace Builder file." This class is a viewController, but not a ViewController for the view I just inserted. I read a lot of questions and answers on this topic and unsuccessfully made many attempts to fix this. Also I do not use the simulator for this project only for the actual iphone.

  • Looked at some inappropriate links in the storyboard
  • I cleaned the application and then built it again
  • I uninstalled the application from the phone.
  • I deleted the file that seems to be causing the problem and added it back.
  • I have a reset phone and reproduced (I read one answer where the problem is with old files in the simulator.

The correct display from an unknown controller is also displayed.

The application does not crash, however it displays a warning in the output log. Any help would be greatly appreciated. thanks.

+4
source share
3 answers

Have you checked that the file was compiled? Click Goal> Generate Phases> Compile Sources.

Ciao!

+19
source

Have you added a new class to a new view controller that was not on the previous storyboard? Did you right-click on each storyboard panel to see if there are any yellow warnings on the connection board?

Sincerely.

+2
source

I have had this problem recently. To fix this, I deleted 2 lines that referenced the storyboard in

Supporting Files/<my app>-Info.plist 
0
source

Source: https://habr.com/ru/post/1483633/


All Articles