I upgraded to Xcode 6 beta 4 and now my App continuously crashes with the message
Unknown class X in Interface Builder file.
It crashes because supposedly Xcode can't find my custom classes that I have linked in my Storyboard but it shows that they are linked correctly in the Xcode interface.
I'm positive everything is linked correctly. My only other option may be to delete the entire storyboard file and start from scratch because it might be corrupted somehow.
Edit: I would also like to add that I tried cleaning, reseting simulator, messing with build phases etc. None of that works.
I faced this problem in Xcode 8, to resolve it I had to modify storyboard in the text editor.
In general, look up for your control and remove
customModule
andcustomModuleProvider
from control entity.Did a trick for me.
The solution was different for me. You need to add the .m of the class to the build phase compiled sources of the target.
Hope this helps!
This can happen in any Xcode above 6.0. It happened to me after renaming some ViewController classes in Swift project (but I guess it will happen with Obj-C too). You just have to open the interface builder, go to Identity Inspector of ViewController that had its class renamed, select class and press Enter. That will reassign renamed class to selected ViewController and also reset Module Value which gets lost after renaming the class.
Update for Xcode 8.1 (probably 8.0 too):
Xcode 8.1 just crashes. Simply and annoyingly just crashes and doesn't print anything. I was chasing that phantom crash for an hour just to find out that it was this very same thing - unassigned class in IB. If you're getting some phantom crashes, double check IB for unassigned classes first.
Check if your class has right Target Membership.
What @gfrs said is correct, you need to set the Module. However I once ran into an issue that my class wasn't listed in the
Class
dropdown. Eventually I removed the swift file, re-started Xcode and re-created the file. Finally the class was listed and could be used in Storyboard.Also have a look at this answer, which looks like to solve the 'real' problem I encountered.
What only worked for me is actually adding the module name to the xib file...
Sooo, the xib files look like this:
HORRIBLE solution in my opinion, but that is supposedly how Apple wants us to do it now.
This question shows 3 possible work arounds back in beta 4 ... apparently Apple has not been very helpful in this situation according to some because they call it "Working as intended."