Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown class info in Interface Builder file

like in the title i got a crazy massage and i cannot handle with it

Unknown class info in Interface Builder file.

Every time I run my Project some crazy bugs will appear or some bars disappear. Did anyone know what to do?

like image 206
CTSchmidt Avatar asked Feb 14 '13 18:02

CTSchmidt


5 Answers

Try this, in order:

  1. Product->Clean in Xcode
  2. Delete the app from the simulator or device
  3. Restart Xcode
  4. (Build &) Run again

If this doesn't help, you likely have a reference to a class in the nib or storyboard that you have to manually find and remove.

like image 130
Brendon Avatar answered Oct 15 '22 03:10

Brendon


I have got the same issue with Lottie library.

Unknown class AnimationView in Interface Builder file.

It can happens if your class view is in an other module.

To resolve this, go in your IB file (Xib or storyboard) / Show the identity inspector and set correctly the module :

enter image description here

like image 41
Kevin ABRIOUX Avatar answered Sep 19 '22 16:09

Kevin ABRIOUX


The warning may be because you have assigned a removed/deleted custom class name for one of the UIView subclass. In order to fix such scenarios,

Open interface builder class as Source Code by right clicking on it (Open As -> Source Code).
Find your unknown class name in the source file. And handle accordingly.

It worked for me.

like image 10
QUserS Avatar answered Oct 15 '22 02:10

QUserS


See my answer to https://stackoverflow.com/a/29013058/784318

I did run into this problem today using Swift.

I changed a class Model.h + Model.m to a Model.swift. This object was used in Interface Builder with the class = Model.

As soon as I replaced the object the class could no longer be loaded.

What I had to do was to change the class reference in IB from:

Class = Model
Module = 

to

Class = Model
Module = <TARGETNAME>

You'll find the <TARGETNAME> in the build settings. It is also the name that shows up in your generated Swift-Header: #import "TARGETNAME-Swift.h"

like image 3
Besi Avatar answered Oct 15 '22 01:10

Besi


I have solved this problem (while using Swift 4 / Xcode 10.1) by going to Custom Class panel, checking 'Inherit Module From Target' (right below Class & Module row).

like image 2
Subhankar Ray Avatar answered Oct 15 '22 03:10

Subhankar Ray