Last active
December 6, 2020 16:08
-
-
Save 9bany/345f345ec79836519bd2228c56725601 to your computer and use it in GitHub Desktop.
Shell script file: fix carthage build framework error with xcode 12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# carthage.sh | |
set -euo pipefail | |
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) | |
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT | |
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig | |
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig | |
# if built was error developement target ios | |
# replease this code line | |
# <--- | |
# echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR)) | |
# IPHONEOS_DEPLOYMENT_TARGET = 10.0 ' >> $xcconfig | |
# ---> | |
export XCODE_XCCONFIG_FILE="$xcconfig" | |
carthage "$@" --platform ios --no-use-binaries | |
# multiple platform: --platform ios,macos | |
# show log: --verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment