Home > front end >  Xcode files in Red - but file still there
Xcode files in Red - but file still there

Time:01-27

I've been working on an Xcode project on my desktop, and I was trying to save it to GitHub, so I could access it on the road. I've saved it to GitHub before, without issues, and the local Desktop version was working fine. After saving it to GitHub, I tried downloading it on the laptop, to make sure everything was fine, and one file was in red. It doesn't look like it was saved or even exists. I get a "Build Input File can't be found" error.

I went back to the Desktop version - that file is there and everything works. I thought, maybe I messed up with GitHub, so I tried to save it to iCloud, and then emailed myself a zip copy - same thing. Every other version, but the desktop version, had that one missing file in red.

I've looked at other posts for those with similar problems, and all the answers seem to say the same thing - the file was moved or deleted; however, it is still there on my original desktop working version. Any thoughts as to what is going on or what I should do are welcome.

I'm working on XCode 13.1, on a Mac running iOS 12.1

CodePudding user response:

Probably the file is not inside the project folder. This can easily happen with resources such as images and sound files that you copy to the project navigator. The project works fine but it has an external reference to the file. If the project folder is copied, eg zipped, the file is missing because it was not part of what was copied.

CodePudding user response:

This generally occurs when you moved or deleted that file within Finder.

So try to delete that file from your project in Xcode and then re-add that file to your project folder in Xcode. Then your file would be working fine.

CodePudding user response:

first: get your file from the current full path and cony it to any location on your mac enter image description here Second: delete the red file from Xcode third: drag file from the new location to Xcode don't forget to check on copy if you needed :)

  •  Tags:  
  • Related