0

I am trying to add Other Swift Flags with shell script but i can't find a way

The reason why we want to add Other Swift Flags values in the shell is because we are operating the feature-flags dynamically.

Previously, we were passing it as a parameter of build_app on fastlane, but now we're switching CI to xcode-cloud, and for that, we're looking for a way to deliver the flag in ci_script

If there's any way to add it, could you tell me how to do

Rei
  • 1
  • 1
  • Using `OTHER_SWIFT_FLAGS` in `xcodebuild` doesn't work? `xcodebuild ... "SWIFT_FLAGS=-D FLAG"`? – Larme Sep 26 '22 at 09:27
  • @Larme xcodebuild would be work but I want to build with xcode-cloud not command build – Rei Sep 26 '22 at 10:07

1 Answers1

0

You will need a separate shell script which runs xcodebuild -showBuildSettings -json, then use jq to parse the output and find the flags you're looking for.

Ben Thomas
  • 1,416
  • 2
  • 17
  • 25