Unknown Class **** in Interface Builder file

Fogmeister picture Fogmeister · Oct 16, 2013 · Viewed 20.2k times · Source

I added a UIView xib file using the root class of MyView.

I created it in the wrong place and so moved it in the project. Same project just a different folder/group.

I then had a problem when running saying...

Unknown Class MyView in Interface Builder file

I couldn't work out what was wrong so I have now deleted the files both from the project and from the directory.

I've done a search using SublimeText2 for the string "MyView" and it doesn't exist anywhere in the project.

I've reset the simulator, cleaned the project and the build folder and deleted derived data.

Still getting the same error.

Any ideas what I can do now?

Answer

ChikabuZ picture ChikabuZ · Nov 30, 2014

Sometimes IBuilder 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">