xcode 16 打包不支持armv7或者armv7s,在执行lipo的时候失败解法

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
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容