2

So when I build my application with a release configuration, I receive the following error below:

enter image description here

Typically this error is because the custom class inside of Interface Builder is not set. I have triple checked and it is set correctly: enter image description here

I've tried deleting the file and re-adding, removing the customModule and customModuleProvider flags inside the XML of the IB file, adding the -Objc build flag, making sure its apart of my target. Nothing works.

The strangest part about this is the error does not occur if I just build my develop configuration. I'm not sure what could be different in the build settings, but maybe something is up?

Also, if I try to type the view controllers name into the Custom Class field in IB it does not autocomplete it like it does for other view controllers.

My view controller class hierarchy is set up like this: FeedViewersViewController: UserListViewController<User>, UserListViewController<T>: UIViewController maybe the generics have something to do with it.

Kylelol
  • 161
  • 8
  • If you use Xcode's Report Navigator to view your build log, do you actually see that controller being compiled for your target/configuration? (I got this error **today** when I changed the name of a class file and forgot to tell Interface Builder about the new name.) – Phillip Mills Sep 18 '17 at 20:01
  • @PhillipMills looking at my build log, if I filter for that view controller file, I do not see it. Then again I do not see any of my view controller files for my project. I only see the `.xib` and `.storyboard` and the `.storyboard` the view controller in question is getting compiled. I also have tried deleting the custom class name and re-adding it and that doesn't work as well. – Kylelol Sep 18 '17 at 20:15
  • did you recently change the name of your app? – TNguyen Sep 18 '17 at 20:32
  • Nope, the display name is different based off the build configuration, but I have not changed the app/project name. – Kylelol Sep 18 '17 at 20:38
  • I think the more interesting part of the error is where it says that is an unknown class (lines 2-3 in your screen shot). Are you sure that class is included in the target? – ghostatron Sep 19 '17 at 00:15
  • I think my question is a duplicate of this one: https://stackoverflow.com/questions/25263882/use-a-generic-class-as-a-custom-view-in-interface-builder . IB doesn't like when your view controllers are defined with generics. – Kylelol Sep 19 '17 at 12:33

0 Answers0