在swift項(xiàng)目中捞镰,用carthage管理第三方庫闸与。
然后,執(zhí)行carthage update --platform iOS
時(shí)候岸售,報(bào)錯(cuò)Task failed with exit code 1:
如下圖所示:
解決辦法:
在命令行目錄下践樱,新建 xxx.xcconfig
文件
復(fù)制一下內(nèi)容,粘貼到xxx.xcconfig
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8\
EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))}
在此文件目錄下執(zhí)行:(以后加入新第三方庫時(shí)候依然要先執(zhí)行這句命令)
export XCODE_XCCONFIG_FILE=$PWD/xxx.xcconfig
執(zhí)行:
carthage update --platform iOS --no-use-binaries --cache-builds