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
创建一个新的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里 选择新创建的xconfig,即可解决;
Refer:
https://jira.appcelerator.org/browse/TIMOB-28042
https://github.com/Carthage/Carthage/issues/3019
在Command Line Tools中使用时:
Pod lib lint error: