Xcode 7.1 Swift 2 Unknown class in Interface Builder file

IosXcodeSwiftCocoa

Ios Problem Overview


I've created new Cocoa Touch File. Named it SwipingViewController. enter image description here

Then try to add Custom Class to ViewController.

And when I run the app I receive an error >2015-10-09 10:53:25.054 ParseStarterProject[5369:389307] Unknown class SwipingViewController in Interface Builder file.

Unknown class SwipingViewController in Interface Builder file

Related: https://stackoverflow.com/questions/24924966/xcode-6-strange-bug-unknown-class-in-interface-builder-file

Here is my projects files

Ios Solutions


Solution 1 - Ios

In storyboard below the Custom Class field the module is set to None. Change that to your app module or just remove and enter class again, it should set to default like this:

Solution 2 - Ios

For me the problem was that the class was not part of the Target Membership. Just add the class to the target, and you should see it back on the interface builder.

Target Membership

Solution 3 - Ios

Still seeing this problem with XCode 8.2.1, but I am able to fix the problem by modify these in the storyboard xml file:

  1. Delete customModuleProvider="target" in the viewController tag:

     - <viewController ... customModule="Flights" customModuleProvider="target" sceneMemberID="viewController">
     + <viewController ... customModule="Flights" sceneMemberID="viewController">
    
  2. Delete customModule="Flights" customModuleProvider="target" in the widget tag (in my case, a label tag):

     - <label ... translatesAutoresizingMaskIntoConstraints="NO" id="PzF-6K-Hpi" customClass="YZLabel" customModule="Flights" customModuleProvider="target">
     + <label ... translatesAutoresizingMaskIntoConstraints="NO" id="PzF-6K-Hpi" customClass="YZLabel">
    

I find that step 1 is very important too to resolve the crash/warning and cannot be skipped.

Solution 4 - Ios

I resolved a similar issue by adding '-ObjC' to 'Other linker flags' in the 'Build Settings' of my project.

Solution 5 - Ios

i had a similar issue as well. I had a ViewController with a TableView in it, and the tableView's custom class was called 'ViewController'. I just deleted the custom class for the tableView and the error went away.

Solution 6 - Ios

I resolved this issue by applying view controller initialise. View-controller basic declaration of view did load method and class implementation in *.swift class shows in storyboard.

Solution 7 - Ios

I solved it by manually writing the module name in the storyboard, under the class name. In my case it was the same name as the class, but it may differ.

Solution 8 - Ios

For me: for table view cell in 'Indentity Inspector' unchecked 'Inherit Module From Target' and cleaned the project. It solved the problem and project run successfully

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAlex BelkeView Question on Stackoverflow
Solution 1 - IosNakulView Answer on Stackoverflow
Solution 2 - IosRodrigo GonzalezView Answer on Stackoverflow
Solution 3 - IosYuchenView Answer on Stackoverflow
Solution 4 - IossagnitudeView Answer on Stackoverflow
Solution 5 - IoskevView Answer on Stackoverflow
Solution 6 - IosRaviMView Answer on Stackoverflow
Solution 7 - IosMijailView Answer on Stackoverflow
Solution 8 - IosKiryl IvanouView Answer on Stackoverflow