To reproduce, build the attached example project, or do the following changes to an existing xcodeproj (tested with a macos cocoa project):
Add a Run Script build phase, add one entry to Input Files: $(TARGET_BUILD_DIR)/$(WRAPPER_NAME), place the build phase last (after Copy Bundle Resources)
Add a Copy Files build phase at the end, after the Run Script phase
If building this with Xcode's xcodebuild, it builds fine. With xcbuild instead (just invoke xcbuild in the directory), the build ends with this message:
error: cycle detected building invocation graph
** BUILD FAILED **
If building with -executor ninja, the build hangs, but if interrupted and restarted, it completes correctly.
To reproduce, build the attached example project, or do the following changes to an existing xcodeproj (tested with a macos cocoa project):
$(TARGET_BUILD_DIR)/$(WRAPPER_NAME)
, place the build phase last (after Copy Bundle Resources)If building this with Xcode's xcodebuild, it builds fine. With xcbuild instead (just invoke
xcbuild
in the directory), the build ends with this message:If building with
-executor ninja
, the build hangs, but if interrupted and restarted, it completes correctly.