3
votes

I have deleted all of the original files (Main.storyboard and ViewController.M and ViewController.H) and I have created a new storyboard (I have my reasons) but when a run time error produces "Unknown class ViewController in Interface Builder file" I have tried deleting the Module text as shown elsewhere but still nothing.

Any suggestions?

1
Honestly if no-one ever did any coding until they had "read the documentation" then not only would they not understand the documentation (as it is almost always aimed at people of certain standard and written in jargon) but they would never get started. I came across this error following a simple walk-through. I hope you will remove your comment and remove your down vote. You do our community a disservice. - James Robinson

1 Answers

7
votes

Sometimes Xcode missed customModule="AppName" customModuleProvider="target"

To fix it, open storyboard as source code and replace this line:

<viewController storyboardIdentifier="StoryboardId" id="SomeID"   customClass="CustomClass"
sceneMemberID="viewController">

to this:

<viewController storyboardIdentifier="StoryboardId" id="SomeID" customClass="CustomClass"
 customModule="AppName" customModuleProvider="target" sceneMemberID="viewController">