• iOS CI/CD 持续集成 组件化专题二 Cocoapods /Cocoapods Packager 问题汇总


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

    1. 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
    2. /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')
    3. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'AFNetworking' from project 'Pods')
    4. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'AFNetworking' from project 'Pods')
    5. /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')
    6. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'MJRefresh' from project 'Pods')
    7. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'MJRefresh' from project 'Pods')
    8. /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')
    9. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHCategorySDK' from project 'Pods')
    10. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHCategorySDK' from project 'Pods')
    11. /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')
    12. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'SVProgressHUD' from project 'Pods')
    13. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'SVProgressHUD' from project 'Pods')
    14. /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')
    15. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'HSAMPaySDK' from project 'Pods')
    16. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'HSAMPaySDK' from project 'Pods')
    17. 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')
    18. 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')
    19. 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')
    20. /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')
    21. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHModel' from project 'Pods')
    22. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHModel' from project 'Pods')
    23. /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')
    24. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'Toast' from project 'Pods')
    25. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'Toast' from project 'Pods')
    26. /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')
    27. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHAlertSDK' from project 'Pods')
    28. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHAlertSDK' from project 'Pods')
    29. /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')
    30. 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')
    31. 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')
    32. /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')
    33. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHBaseSDK' from project 'Pods')
    34. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHBaseSDK' from project 'Pods')
    35. /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')
    36. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'SDAutoLayout' from project 'Pods')
    37. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'SDAutoLayout' from project 'Pods')
    38. /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')
    39. error: The armv7 architecture is deprecated. You should update your ARCHS build setting to remove the armv7 architecture. (in target 'YHUtiliitiesSDK' from project 'Pods')
    40. error: The armv7s architecture is deprecated. You should update your ARCHS build setting to remove the armv7s architecture. (in target 'YHUtiliitiesSDK' from project 'Pods')
    41. ** 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

    原内容:

    1. def ios_build_options
    2. "ARCHS=\'x86_64 i386 arm64 armv7 armv7s\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
    3. end

    修改为:

    1. def ios_build_options
    2. "ARCHS=\'$(ARCHS_STANDARD)\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments'"
    3. end

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

     sudo vim /Library/Ruby/Gems/2.6.0/gems/cocoapods-packager-1.5.0/lib/cocoapods-packager/builder.rb
    

  • 相关阅读:
    解决eclipse导入svn项目报 403Forbidden
    C#结合JavaScript实现上传视频到腾讯云点播平台
    高可用eureka服务注册与发现代码例子
    【大数据面试题】014 Flink CDC 用过吗,请简要描述
    HTML 实现 点击按钮切换 整张界面 && 点击按钮切换局部界面
    HashMap中红黑树插入节点的调整过程
    5G频段简介
    被315点名的流氓下载器,又回来了…
    DRF JWT认证(一)
    【2021集创赛】Arm杯三等奖:基于FPGA的人脸检测SoC设计
  • 原文地址:https://blog.csdn.net/m0_61164038/article/details/138069372