Closed andreyz closed 7 years ago
tl;dr The investigation was hard, the fix was not. Update your checkout to 7f39f259de684a331fe2cf6510d000842f9e87f5
The details...
CwlSignal uses a framework target named CwlUtils_iOS to build the CwlUtils dependency for iOS. In the new Xcode build system, this associates it with the package folder "CwlUtils.framework".
However, the CwlUtils_iOS target doesn't build the framework normally, it instead calls into xcodebuild to do this. The reason is that the underlying project is automatically downloaded as needed and if the target were configured normally, Xcode would complain that the project is missing before running the automatic download step remove it from the project.
We don't want to run this xcodebuild call every time (it takes a few seconds just to check dependencies) so we specify inputs and outputs to the build script and Xcode can avoid running the it if the download and the build product are in-sync.
All of this is a weird workaround for dynamically downloaded subprojects but none of it should be technically a problem.
The problem is that the build script specified its output as "CwlUtils.framework" – the same folder that the new Xcode build system already associates with the enclosing CwlUtils_iOS target. The new Xcode build system decided this was a circular dependency and was freaking out. I removed the problematic code signing and other problems cropped up. Eventually the build system stopped getting past the "Planning build" phase. Ergh.
Turns out that if I change the output from the xcodebuild script from "CwlUtils.framework" to "CwlUtils.framework/CwlUtils" (i.e. the executable inside the package) all the problems go away.
Fun times.
With Xcode 9 beta 2 with new build system enabled, I get
I include the framework manually, following all steps from the current README. Also with old build system enabled the project builds successfully.