Xcode 12,carthage update 報(bào)錯(cuò)
eg:
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/vp/nr24phw118vcczpjgwy3jt680000gp/T/carthage-xcodebuild.723t8z.log
解決方法:
1、在當(dāng)前工程根目錄下,創(chuàng)建個(gè) carthage.sh
vi ?carthage.sh ? ?//創(chuàng)建個(gè) .sh 腳本文件
2、腳本內(nèi)容
#!/usr/bin/env bash ?
# carthage.sh
# Usage example: ./carthage.sh build --platform iOS
set -euo pipefail
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
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
export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"
3、使腳本可執(zhí)行,修改腳本權(quán)限
?chmod +x carthage.sh
4、用 ./carthage.sh + *** ? ? ? 替代 carthage + ***?
eg:
./carthage.sh build ? ? ? ?
./carthage.sh update --use-submodules
鏈接地址
Carthage builds fail at xcrun lipo on Xcode 12 beta (3,4,5...)