Posts

Post not yet marked as solved
0 Replies
332 Views
We are trying to use xcodebuild to build our frameworks, instead of using manual Xcode IDE running buttons. The issue is that in our framework we use ACTIVE_COMPILATION_CONDITIONS, which have several values. Those values are then used to check at runtime if the particular framework is integrated, like checking for Sentry: #if SENTRY_AVAILABLE import Sentry #endif The problem is that, for some builds, we need to override our project settings, specifically ACTIVE_COMPILATION_CONDITIONS. However, after the following script successfully executes, the Xcode still does not override our provided ACTIVE_COMPILATION_CONDITIONS with defined in the project. The script: xcodebuild -workspace project.xcworkspace -scheme SDKNR1 ONLY_ACTIVE_ARCH=NO EXCLUDED_ARCHS=arm64 ACTIVE_COMPILATION_CONDITIONS=SENTRY_AVAILABLE -configuration release -derivedDataPath $PROJECT_DIR/../simulators/SDKNR1 -sdk iphonesimulator ENABLE_BITCODE=YES BITCODE_GENERATION_MODE=bitcode OTHER_CFLAGS="-fembed-bitcode" clean build As you can see we define ACTIVE_COMPILATION_CONDITIONS=SENTRY_AVAILABLE, however it will not override target's (SDKNR1) project settings. Suppose, SDKNR1 does not have any ACTIVE_COMPILATION_CONDITIONS. We expected that xcodebuild command would override target's ACTIVE_COMPILATION_CONDITIONS and would include SENTRY_AVAILABLE Would welcome any ideas, or perhaps it is not possible?
Posted Last updated
.