Home > Software design >  Xcode can't find files after relocating some files in the project
Xcode can't find files after relocating some files in the project

Time:01-16

After relocating some files in an Xcode Project (moving some files into different folders without editing the files), Xcode can't archive the product anymore. Xcode was able to compile, build and archive the project before I restructured the project. Now Xcode can compile and build the project but it can't archive the project, saying that it can't find specific files and objects in scope, which are inside the files I relocated.

When I click on the missing objects in the navigator and i'm taken to the object-reference, the error disappears. Only to show up again upon archiving.

enter image description here

It seems like Xcode failed to update the paths of the files upon relocating. How would I be able to manually edit that?

Thanks in advance!

P.S: I use git and GitHub incase that matters.

CodePudding user response:

The problem was fixed by removing all files, and re-adding them from Finder by dragging and dropping them onto the Project Navigator.

I did run across the following issue afterwards: Xcode 10 Error: Multiple commands produce

Which was easily solved by following the solution in that post.

Credits to @Jokecoder for suggesting the solution.

  • Related