Jenkins CI/CD 持续集成专题三 Cocoapods /Cocoapods Packager 问题汇总

执行pod package xxx.podspec --force --no-mangle --exclude-deps --verbose

报错

java 复制代码
 warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'AFNetworking' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'AFNetworking' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'AFNetworking' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'MJRefresh' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'MJRefresh' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'MJRefresh' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHCategorySDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHCategorySDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHCategorySDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SVProgressHUD' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'SVProgressHUD' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'SVProgressHUD' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'HSAMPaySDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'HSAMPaySDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'HSAMPaySDK' from project 'Pods')
    warning: no rule to process file '/var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/HSAMPaySDK/HSAMPaySDK/Classes/HSACommon/HSA-NetEncryption-iOS/Wrapper/SM2/libtommath-0.42.0/callgraph.txt' of type 'text' for architecture 'arm64' (in target 'HSAMPaySDK' from project 'Pods')
    warning: no rule to process file '/var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/HSAMPaySDK/HSAMPaySDK/Classes/HSACommon/HSA-NetEncryption-iOS/Wrapper/SM2/libtommath-0.42.0/changes.txt' of type 'text' for architecture 'arm64' (in target 'HSAMPaySDK' from project 'Pods')
    warning: no rule to process file '/var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/HSAMPaySDK/HSAMPaySDK/Classes/HSACommon/HSA-NetEncryption-iOS/Wrapper/SM2/libtommath-0.42.0/LICENSE' of type 'text' for architecture 'arm64' (in target 'HSAMPaySDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHModel' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHModel' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHModel' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'Toast' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'Toast' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'Toast' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHAlertSDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHAlertSDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHAlertSDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'Pods-packager' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'Pods-packager' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'Pods-packager' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHBaseSDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHBaseSDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHBaseSDK' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/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 11.0 to 16.2.99. (in target 'SDAutoLayout' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'SDAutoLayout' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'SDAutoLayout' from project 'Pods')
    /var/folders/kg/n7fj8msd3917sfj3s7_22jym0000gn/T/cocoapods-a1vvbpsa/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'YHUtiliitiesSDK' from project 'Pods')
    error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHUtiliitiesSDK' from project 'Pods')
    error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHUtiliitiesSDK' from project 'Pods')
    ** BUILD FAILED **

Cocoapods Packager的最新发布 1.5.0 在 2016 年, 最新的代码提交在 2019 年,升级到Xcode14之后苹果做了一些优化,Cocoapods Packager没有适配

(Xcode 14 Release Notes,目前最低支持版本已经提到了 iOS11,并且自然而然的移除了无法升级到 iOS11 的armv7, armv7s, and i386。)

解决办法:通过修改cocoapods-packager的builder.rb 的 ARCHS 为

$(ARCHS_STANDARD)成功修复了Xcode14打已经被移除的armv7(s)失败的问题

参考目录: /Library/Ruby/Gems/2.6.0/gems/cocoapods-packager-1.5.0

如果没有,可以考虑先找到gems的其他可能目录,比如/usr/local/lib/ruby/gems/2.6.0/gems

原内容:

python 复制代码
 def ios_build_options
      "ARCHS=\'x86_64 i386 arm64 armv7 armv7s\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
    end

修改为:

ruby 复制代码
def ios_build_options
   "ARCHS=\'$(ARCHS_STANDARD)\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments'"
end

如果提示没有写入权限,可以使用命令行

ruby 复制代码
 sudo vim /Library/Ruby/Gems/2.6.0/gems/cocoapods-packager-1.5.0/lib/cocoapods-packager/builder.rb
相关推荐
神即道 道法自然 如来5 小时前
Jenkins怎么设置每日自动执行构建任务?
运维·jenkins
寻爱的希斯克利夫14 小时前
tomcat 配置jenkins_home 目录
servlet·tomcat·jenkins
不惑_1 天前
Logstash 安装与部署(无坑版)
运维·jenkins
Lill_bin2 天前
ElasticSearch底层原理解析
大数据·分布式·elasticsearch·搜索引擎·zookeeper·云原生·jenkins
爱吃香蕉的阿豪2 天前
828华为云征文|Flexus X实例Docker+Jenkins+gitee实现CI/CD自动化部署-解放你的双手~
ci/cd·docker·gitee·华为云·jenkins
俗庸2033 天前
带你如何使用CICD持续集成与持续交付
运维·ci/cd
laufing3 天前
基于 jenkins 的持续集成、持续部署方案
运维·ci/cd·jenkins·开发
demon75520034 天前
GitLab CI_CD 从入门到实战笔记
笔记·ci/cd·gitlab
NEIL_XU_5 天前
jenkins流水线+k8s部署springcloud微服务架构项目
服务器·spring cloud·架构·kubernetes·jenkins
Linux运维老纪5 天前
基于zabbix实现监控Jenkins过程---超详细
linux·云计算·jenkins·zabbix·运维开发