For me, this error occurred while also accompanied by Xcode 10 Error: Multiple commands produce errors during the troubleshooting process.
In my case, I had a main project that had a reference to BFramework.xcodeproj
which built a B.framework
included in my main app bundle. BFramework.xcodeproj
, in turn, had a reference to (and relied on) ANTLR4Framework.xcodeproj
. The main app also had a reference to (and relied on) ANTLR4Framework.xcodeproj
, to build the ANTLR4.framework
and include it in the app bundle alongside of B.framework
.
BFramework.xcodeproj
had a relative path style reference to ANTLR4Framework.xcodeproj
(which is the kind you probably want). The problem arose because my main app project had an absolute path style reference to the ANTLR4Framework.xcodeproj
project. This means everything built and worked fine for the original project because they were both referencing the same ANTLR4Framework.xcodeproj
project on the file system. When I duplicated the project in the Finder and opened it in Xcode, I began getting error messages like in Xcode 10 Error: Multiple commands produce. That was because BFramework.xcodeproj
was referencing the newly duplicated ANTLR4Framework.xcodeproj
while the main project was referencing the previous absolute path to the original ANTLR4Framework.xcodeproj
. When I renamed the original project folder, that caused the absolute path reference to be broken, which resulted in the Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference...
messages.
For me, removing the absolute path reference to the ANTLR4Framework.xcodeproj
project from the main project and then adding it back as a relative reference solved the problem.