Issue
使用Xcode編譯項目,遇到error:
fatal error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: Path1/Release-iphonesimulator/xxxx.framework/xxxx and Path2/Release-iphoneos/xxxx.framework/xxxx have the same architectures (arm64) and can't be in the same fat output file
Reason
Simulator build, using Xcode 12 Beta 3, has 3 architectures - arm64, armx86_64, i386
Device build, using Xcode 12 Beta 3, has 2 architectures - armv7 and arm64
Creating fat library is failed as both have 'arm64' architecture.
似乎是Apple在為使用自家Silicon芯片做準備,目前不確定release后是否仍是這樣;
Solution
創(chuàng)建一個新的xcode12-beta3-solution.xcconfig file:
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))
在選中YourProjectName.xcodeproj,在主面板里選擇Project->Info->Configuration里 選擇新創(chuàng)建的xconfig,即可解決;
Refer:
https://jira.appcelerator.org/browse/TIMOB-28042
https://github.com/Carthage/Carthage/issues/3019
在Command Line Tools中使用時:
Pod lib lint error: