Command
/usr/local/bin/pod init
Report
What did you do?
What did you expect to happen?
What happened instead?
Stack
CocoaPods : 1.10.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
RubyGems : 3.0.3
Host : macOS 11.3.1 (20E241)
Xcode : 13.2.1 (13C100)
Git : git version 2.32.0 (Apple Git-132)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 524bd24a333f7082415c800ee1068fdb7ebe8926
SAPSpecs - git - https://git.n.xiaomi.com/mi-planet/ios/planetsubmoulde/sapspecsource.git @ a145e46d07922c15ef0cacca5ab81471ecd66a1c
trunk - CDN - https://cdn.cocoapods.org/
xiaomi-mi-planet-ios-planetsubmoulde-sapspecsource - git - https://git.n.xiaomi.com/mi-planet/ios/planetsubmoulde/sapspecsource.git @ 0f33e4d5ac4e8c04e76fb6e245fd06e044866ecc
xiaomi-miwearpodlib - git - git@git.n.xiaomi.com:miwear-ios/miwearpodlib.git @ f542d021e3ba04ec6f5008f29473a91cbb0254e5
xiaomi-onetrack-specs - git - https://git.n.xiaomi.com/onetrack/Specs @ 2fbd4285549345a56afe5fd12854e92d753662b9
xiaomi-songqian1-sapspecs - git - https://git.n.xiaomi.com/songqian1/SAPSpecs.git @ 522a2df8b1cd3eae556deb0bde6ec36c94bb8ac0
xiaomi-specs - git - git@v9.git.n.xiaomi.com:maiossdk/specs.git @ 6514f4423fd22504d4fd9dad58aff06980b37f9a
xiaomi-specs-1 - git - git@git.n.xiaomi.com:maiossdk/specs.git @ da5999558e8bd9e68d3239829fab11058dc6f72c
xiaomi-specs-2 - git - git@git.n.xiaomi.com:mi-planet/ios/fork-youpin-code/Specs.git @ 1d7bcf67f4cc16fdee1819ffd33271f144c05c64
xiaomi-specs-3 - git - git@git.n.xiaomi.com:onetrack/Specs.git @ 2fbd4285549345a56afe5fd12854e92d753662b9
Plugins
cocoapods-binary : 0.4.4
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
Error
RuntimeError - [Xcodeproj] Unknown object version.
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.19.0/lib/xcodeproj/project.rb:227:in `initialize_from_file'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.19.0/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/11125 [closed] [3 comments]
2 weeks agoRuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/7458 [closed] [23 comments]
a week agoCMake generated project is unable to find Pods framework during linkage
https://github.com/CocoaPods/CocoaPods/issues/10676 [open] [23 comments]
25 Jan 2022
and 75 more at:
https://github.com/cocoapods/cocoapods/search?q=%5BXcodeproj%5D%20Unknown%20object%20version.&type=Issues&utf8=✓
解决方案:
gem install cocoapods --pre --user
升级cocoapods 适配Xcode13