1 问题描述:
打包报错
Pod installation complete! There is 1 dependency from the Podfile and 6 total pods installed.
Building framework XXX (4.7.0) with configuration Release
Build command failed: xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited) PodsDummy_Pods_XXX=PodsDummy_PodPackage_XXX' ARCHS='x86_64 i386 arm64 armv7 armv7s' OTHER_CFLAGS='-fembed-bitcode -Qunused-arguments' CONFIGURATION_BUILD_DIR=build clean build -configuration Release -target Pods-packager -project Pods/Pods.xcodeproj 2>&1
Output:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild "GCC_PREPROCESSOR_DEFINITIONS=$(inherited) PodsDummy_Pods_XXX=PodsDummy_PodPackage_XXX" "ARCHS=x86_64 i386 arm64 armv7 armv7s" "OTHER_CFLAGS=-fembed-bitcode -Qunused-arguments" CONFIGURATION_BUILD_DIR=build clean build -configuration Release -target Pods-packager -project Pods/Pods.xcodeproj
........
The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.0.99. (in target 'XXX' from project 'Pods')
/var/folders/2q/6x50gfjd7hq6dv5bnlz5h3x00000gn/T/cocoapods-v93xjd0v/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 12.0 to 18.0.99. (in target 'XXX' from project 'Pods')
error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'XXX' from project 'Pods')
error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'XXX' from project 'Pods')
** BUILD FAILED **
2. lipo出错
Building mangled framework
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: Pods/build/package.a and Pods/build-sim/package.a have the same architectures (arm64) and can't be in the same fat output file
3 解决方法
1 卸载cocoapods-packager
gem uninstall cocoapods-packager
2 安装cocoapods-packager-next来替代,用法和cocoapods-packager一样,目cocoapods-packager-next最新版本2.0.1
gem install cocoapods-packager-next -v 2.0.1