Skip to content

Instantly share code, notes, and snippets.

@ppm
Last active June 17, 2019 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppm/2145199d891fd9b064d37e1f66111420 to your computer and use it in GitHub Desktop.
Save ppm/2145199d891fd9b064d37e1f66111420 to your computer and use it in GitHub Desktop.
Generate xcconfig to inject iOS 13 compilation condition
if [ $SDK_VERSION_MAJOR -ge 130000 ]; then
CONDITIONS="AVAILABLE_iOS_13 \$(inherited)"
else
CONDITIONS="\$(inherited)"
fi
cat <<_EOT_ > "$PROJECT_DIR/Generated/Custom.xcconfig"
SWIFT_ACTIVE_COMPILATION_CONDITIONS=$CONDITIONS
_EOT_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment