Cannot insert new outlet connection

Hello


I am having a very serious problem wiht XCode Version 8.1 (8B62).


XCode would not allow me connect an Outlet to the ViewController neither by Ctrl-Draging it or by using the identity Inspector.


It thoughs me the following error:


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


Additionally, in the Identity inspector, under Custom Class, in the Class select box there ViewContoller class is not listed at all. Which the ViewController.swift is absolutely not included into the project.


I have tried all sorts of solutions but nothing works.


The same issue happens even when I create a brand new project.


Does anyone know if it is an XCode BUG?

How can this be fixed?


Here are the screen shots:

http://montrealwdb.com/temp/xcode/1.png

http://montrealwdb.com/temp/xcode/2.png

http://montrealwdb.com/temp/xcode/3.png


Thanks a lot in advance

I realized that by turning intexation back on fixes the issue. But I do not understand how is it related to the Outlet connection feature.


I use the following command line in the terminal to activate/deactivate indexation: defaults write com.apple.dt.XCode IDEIndexDisable 0

Just an assumption here.


Without indexing, XCode cannot find the references needed to connect the Outlet.


As described here, no-indexing limits some functions :

Indexing is done in the background; the Activity View indicates when indexing is being performed. Until the index is ready, some functions that require the index may not be available (for example, Open Quickly); others may have degraded performance (for example, syntax coloring of system symbols). When the index is complete these features become available immediately.


http : / / way2ios.com/development/ios-development-2/iphone-2/xcode-4-x_slow_issues/

Thanks for the reply Claude.

So are you assuming that this is why the Outlets would not connecting?

I had the intexing off and still was able to connect outlets until it suddenly stopped.

But on the other hand as soon as I activated the indexing it fixed the issue.

You may have changed from a connection that Xcode was using from a previous index, still stuck in it's mind, that was corrected by a new index.


Since Xcode loves to hang on to old info at times, an option-clean build folder (/Product menu w/option pressed) helps to flush the old and build new.

Product > Clean command helped me to solve the problem.

Clean and Opt-Clean do not work for me!


Xcode 9


I have a Table View, created a custom cell view and now can not add new outlets to the custom cell. The single original outlet to a label before I switch the class still works. Just can not add new UI to the custom cell

Cannot insert new outlet connection
 
 
Q