Could not insert new outlet connection [duplicate]
Solution 1:
I got the same problem as you today... I think this is a bug of Xcode, below is the way to fix the issue:
- Close the project you are working on with.
- Delete your project's【DerivedData】folder. (This folder may inside your project's folder, or inside ~/Library/Developer/Xcode/DerivedData/(your project)/ ) or somewhere else that was setup by you.
- restart your project.
After these steps, the problem should be solved. And from my experience, these steps can solve many Xcode problems, so if you got some problem with Xcode again, try these steps first.
Solution 2:
Removing(removing reference, not deleting) and then adding the appropriate file(the file of class you want to add the outlet to) is actually enough.
Edit 1 I found that after unchecking (in XCode 6.3.1) I had to wait a few seconds for the Indexing
to appear and complete in the project name box. Same for the way backwards. This increased chances to fix the issue in almost all (but not all) cases.
Edit 2 Removing reference means that You do not delete the file completely but just remove it from the project (it still exist in the folder of your project, you add it later).
Solution 3:
That's most often a problem of file indexing
.
To fix it try to clean your target
and if this doesn't work, go to your Derived Data
folder and delete your application there.
This will force xCode to reindex the files