• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Xcode 14 新建项目没办法pod 报错

武飞扬头像
app开发工程师V帅
帮助2

参考链接:

http://www.licqi.com/artikel/11110.html

问题:Xcode 14 创建的新项目,无法进行Pod install

报错如下:

  1.  
    [!] Oh no, an error occurred.
  2.  
     
  3.  
    Search for existing GitHub issues similar to yours:
  4.  
    https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D Unknown object version %2856%29.&type=Issues
  5.  
     
  6.  
    If none exists, create a ticket, with the template displayed above, on:
  7.  
    https://github.com/CocoaPods/CocoaPods/issues/new
  8.  
     
  9.  
    Be sure to first read the contributing guide for details on how to properly submit a ticket:
  10.  
    https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
  11.  
     
  12.  
    Don't forget to anonymize any private data!
  13.  
     
  14.  
    Looking for related issues on cocoapods/cocoapods...
  15.  
    - Pod init in xcode 14.1 and mac os ventura 13.0.1
  16.  
    https://github.com/CocoaPods/CocoaPods/issues/11656 [open] [19 comments]
  17.  
    a week ago
  18.  
     
  19.  
    - pod init after update it to XCODE 14
  20.  
    https://github.com/CocoaPods/CocoaPods/issues/11546 [open] [21 comments]
  21.  
    2 weeks ago
  22.  
     
  23.  
    - 'pod init' and 'pod install' both fail with "can't modify frozen String (FrozenError)"
  24.  
    https://github.com/CocoaPods/CocoaPods/issues/11594 [closed] [4 comments]
  25.  
    3 days ago
  26.  
     
学新通
  1.  
    end
  2.  
    ```
  3.  
     
  4.  
    ### Error
  5.  
     
  6.  
    ```
  7.  
    RuntimeError - [Xcodeproj] Unknown object version (56).
  8.  
    /Users/zst01/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file'
  9.  
    /Users/zst01/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
  10.  
    ........

提示: Unknown object version (56) --未知对象版本(56)

解决:如何修改compatibilityVersion呢?可以通过 Project Format,可以暂时将Project Format:

 Xcode 14.0-compatible改为Xcode 13.0-compatible

如图:

学新通

 原因:

是版本不匹配导致的,应该和升级Xcode 14有关系。

  1.  
    in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
  2.  
     

但是官方还没有给出解决方案。应该后续会有兼容的cocoapods 新版本。
通过与老项目对比发现是compatibilityVersion Xcode 兼容版本不一致,那么我们就可以将这个版本修改到低版本试试

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgbjcgb
系列文章
更多 icon
同类精品
更多 icon
继续加载