0

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

Tal Zion
  • 6,308
  • 3
  • 50
  • 73
  • Have you tried with "Debug" instead of "-Debug"? – madlymad Apr 02 '20 at 08:26
  • Thanks!!, I was breaking my head for hours. It was working for all config apart from Release. Any idea? Error: clang error linker command @madlymad – Tal Zion Apr 02 '20 at 08:53
  • I think that linker error happens when, the library headers are there but the library code is missing. You have to check the xcode build flags for this library. – madlymad Apr 02 '20 at 13:01

0 Answers0