user12145455
user12145455

Reputation:

Why did one of my files in Xcode disappear?

While I was working on my project I found out that I couldn't run my project anymore because I had this kind of error:

Build input file cannot be found: '/Users/andreagualandris/Desktop/Xcode Projecs/InstagramClone/InstagramClone/ViewControllers/SignUpViewController.swift'

Basically one of my ViewController files has disappeared. I can still see the name of the viewController listed in the files but the icon is more pale than the other ones: see here and when you click on it a system sound forbids you to click on it. How can I solve this problem?

Upvotes: 1

Views: 111

Answers (2)

kzakharc
kzakharc

Reputation: 499

  • Click right button on file, choose Show in Finder

enter image description here

If you can find it here:

  • delete reference from this file on the left panel

enter image description here


Add it again (you need to choose Copy items if needed, Create groups)

enter image description here

Upvotes: 2

Anuranjan Bose
Anuranjan Bose

Reputation: 231

Go to Recovered References , and remove the file from there and add the file again with proper reference. Clean the project and build again.enter image description here

Upvotes: 0

Related Questions