Ege Kaan Gürkan Ege Kaan Gürkan - 16 days ago 6
Swift Question

Could not insert new outlet connection: Could not find any information for the class named

I got an error on Xcode saying that there was no information about the view controller.


Could not insert new outlet connection: Could not find any information for the class named


Why is this happening?

Screenshot 1

Answer

Here are some things that can fix this (in increasing order of difficulty):

  • Clean the project (Product > Clean)
  • Completely close Xcode and restart your project.
  • Delete the Derived Data folder (Window > Projects > click Delete button by Derived Data.) (Update: In Xcode 8 this location no longer appears. Supposedly Xcode cleans up Derived Data by itself. If you want to delete it manually you can find the folder yourself by going to Preferences > Locations and clicking the gray arrow by the Derived Data folder. Then delete your project folder.)
  • Click delete on the class, remove reference (not Move to Trash), and add it back again. (see this answer)