error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference(\"3bf83096e50de72a94699e9afc1133ebe3512682230d04680075c283a974e273\")) (in targ
This was the culprit for my experience of the same error:
After setting the correct version of Command Line Tools (i.e., Xcode 10.2.1; see below) on my system, the error went away!
Seems like there are a number of reasons for which one runs into the same error. For my case, it was not having the Submodule checked out locally
. After I made sure all my Submodules were downloaded, the error went away.
The key here is missingTargetProductReference
, or you might get namedReferencesCannotBeResolved
. Xcode can't find something.
This happened after upgrading to Swift5/Xcode10.
I found that removing linked frameworks and then re-adding them fixed the issue.
The problem is that on new xcode 10.2 there is a new BUILD Configuration, you need to change to LEGACY.
You can check how to change it here: https://medium.com/xcblog/five-things-you-must-know-about-xcode-10-new-build-system-41676cd5fd6c . CHECK THE GIF
So if you have a newer version of xcode different than the one used when the project was working probably this is what is causing the issue.
I've faced the problem in Xcode 10.1.2. Xcode restarting and the clean project solve it in my case.
For me, XCode > Product > Clean Build Folder
and restart Xcode
then worked.