うちのいぬ Tech Blog

Tech Blog of Uchinoinu/My dog

How to fix error "Could not insert new outlet connection and deleting DerivedData doesnt work"

Environment

Situation

  • Using Storyboard, when I tried to connect IBOutlet, error "Could not insert new outlet connection and deleting DerivedData doesnt work" was shown
  • And set automatic in Assistant Editor, No Result was shown, and targeted View Controller never been shown
  • But targeted ViewController has been set already

I thought

  • Basically valid indexing resolves any problems

Try

Indexing

  • Set Index On, and automatically launch indexing
    • Command to launch it defaults write com.apple.dt.Xcode IDEIndexDisable 0

Second hand: Clear old data and retry connecting with clear Xcode

  • Clear cache
    • rm -rf ~/Library/Caches/com.apple.dt.Xcode
  • Clear DerivedData
    • rm -rf ~/Library/Developer/XCode/DerivedData/{project name}
  • Clean Build
  • Restart Xcode

Result

  • Delete DerivedData and indexed, problems was solved