I am trying to build different build configurations from the command line but whenever I am setting a specific build configuration it fails.
Some notes:
- All builds are passing from Xcode
- Default configurations set for the command line is Debug
- I am NOT using cocoapods
- The project has submodules
- When adding new configurations, I added the same configurations to the submodules
- To fix the SEARCH_PATH, I added the settings https://stackoverflow.com/a/52471946/4697535
- IMPORTANT: When building with the default configurations, it PASSES
Commands:
without configurations:
This is working and running the Debug
configurations
xcodebuild -scheme <MyScheme> -sdk iphonesimulator.13.2
With configurations
xcodebuild -scheme <MyScheme> -sdk iphonesimulator.13.2 -configuration -Debug
xcodebuild -project <MyProject>.xcodeproj -sdk iphonesimulator.13.2 -configuration -Debug
Error: No such module SomeFramework (this is a submodule)
The following build failed:PBXCp {some_framework_path}
I tested with other build configurations and got the same error [Stage, Debug, Release, Production]
. Don't understand why this would pass in Xcode but would keep failing in the command line. In addition, I don't understand why the default xcodebuild
would pass with Debug, but when explicitly setting the -configuration
to the same env, it will fail.
Please note that there are similar questions but all face different issues, either using cocoapods or their xcodebuild script was wrong. I could not find any solution with build configurations and submodules