I wanted to add two other solutions that worked for me, in two separate cases were I got the same message (Unknown class MySwiftClass in Interface Builder file.
)
In the first case, I had a Swift subclass of a UIViewController. Well I had thought I wanted to set something in init so I had implemented:
override func initWithNibName:bundle:
As that's the designated initializer... I was every doing anything in the method yet, it was just in place. And yet at runtime my class was not seen until I removed that method.
The other case I had a different Swift UIViewController
subclass that also was not being found at runtime. The end fix for that was to re-name the Swift class (I added a "2" into the name). I changed the class also in the storyboard, and suddenly it worked... this was after trying to remove the name from the storyboard and re-adding, which did not work.
Both of these cases may really be other examples of the accepted answer - but in my case just changing the name in the storyboard was not enough, I had to change the swift class itself in some way.