In the past I’ve frequently encountered situations where Xcode wants to look for files that no longer exist and that were removed from XCode; and have come to the conclusion that some data is being cached by XCode somewhere in a build directory and that at least parts of this is being consulted rather than the XCode workspace itself.
Here’s an example of a situation I have now which shows this is indeed the case:
I had a workspace W, containing projects M and N, in directory D.
- To this workspace I added a new project O.
- I then deleted the entire contents of directory D.
- From a backup I copied an older copy of the workspace W into directory D (this older copy only contains projects M and N).
- If I launch the workspace from the backup location it builds cleanly.
- But if I launch the workspace from the directory D, then when building it complains that project O is missing. Yet I deleted the entire contents of directory D and copied the workspace which didn't contain project O into that location.
Xcode must therefore be caching some data somewhere during the build process and that is why it is looking for the project 0 even though it doesn’t exist within the workspace anymore.
Where is this location so that I can delete its contents?
(Its not Organizer/Projects/Derived Data as that has already been deleted.)
besides the derived data some are at
/var/folder/%RANDOM%/%RANDOM%/%RANDOM%/com.apple.DeveloperTools
/var/folder/%RANDOM%/%RANDOM%/%RANDOM%/com.apple.dt.Xcode