```
ArgumentError - [Xcodeproj] Unable to find compatibility version string for object version `70`.
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/xcodeproj-1.27.0/lib/xcodeproj/project.rb:85:in 'Xcodeproj::Project#initialize'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/project.rb:48:in 'Pod::Project#initialize'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb:82:in 'Class#new'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb:82:in 'Pod::Installer::Xcode::ProjectGenerator#create_project'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb:73:in 'Pod::Installer::Xcode::ProjectGenerator#generate!'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:16:in 'Pod::Installer::Xcode::SinglePodsProjectGenerator#generate!'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:320:in 'block in Pod::Installer#create_and_save_projects'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in 'Pod::UserInterface.section'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:315:in 'Pod::Installer#create_and_save_projects'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:307:in 'Pod::Installer#generate_pods_project'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:183:in 'Pod::Installer#integrate'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:170:in 'Pod::Installer#install!'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in 'Pod::Command::Install#run'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in 'CLAide::Command.run'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in 'Pod::Command.run'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/bin/pod:55:in '<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/bin/pod:25:in 'Kernel#load'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/bin/pod:25:in '
'```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
If none exists, create a ticket, with the template displayed above, on:
Be sure to first read the contributing guide for details on how to properly submit a ticket:
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: SSL_connect returned=1 errno=0 peeraddr=20.205.243.168:443 state=error: certificate verify failed (unable to get certificate CRL)
[!] 'WechatOpenSDK-XCFramework' uses the unencrypted 'http' protocol to transfer the Pod. Please be sure you're in a safe network with only trusted hosts. Otherwise, please reach out to the library author to notify them of this security issue.
解决方案总结
问题的根本原因是:您的 Xcode 项目使用了 objectVersion 70(Xcode 16.2
的新格式),但 CocoaPods 1.16.2 中的 xcodeproj gem 不支持这个版本。
我所做的修改:
- 在 LMediaCapure.xcodeproj/project.pbxproj:6 将 objectVersion = 70;
降级为 objectVersion = 56;
当您在 Xcode 16.2 中打开项目时,Xcode 可能会提示升级项目格式。请选择"不
升级"或"以旧格式打开",否则会再次出现此问题
- 如果不小心升级了,您可以再次将 objectVersion 从 70 改回 56