There are not much documentation about this here in the office documentation page https://docs.fastlane.tools/actions/gym/.
The only thing that mentioned compile flag is:
xcargs:
Pass additional arguments to xcodebuild for the build phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS="-ObjC -lstdc++"
This is what we have currently:
gym(options.merge(:export_xcargs => "-allowProvisioningUpdates",
:export_method => "development"))
We would like now adding this flag to our build:
-Xfrontend -warn-long-expression-type-checking=100
We don't want to add it to Xcode project file like this https://github.com/fastred/Optimizing-Swift-Build-Times since we only want this check on the build machine which uses fastlane.
So this is what we tried:
gym(options.merge(:export_xcargs => "-allowProvisioningUpdates",
:export_method => "development",
:xcargs => "-Xfrontend -warn-long-expression-type-checking=100"))
But it keeps complaining about this error:
xcodebuild: error: invalid option '-Xfrontend'
How do we add this flag properly?
This works!
gym(options.merge(:export_xcargs => "-allowProvisioningUpdates",
:export_method => "development",
:xcargs => "OTHER_SWIFT_FLAGS='-Xfrontend -warn-long-expression-type-checking=100'"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With