報(bào)錯(cuò)提示:
Successfully installed cocoapods-1.16.2
Parsing documentation for cocoapods-1.16.2
Done installing documentation for cocoapods after 1 seconds
1 gem installed
good@sundeMac-mini ULVPN % pod install
Analyzing dependencies
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/Applications/CocoaPods.app/Contents/Resources/bundle/bin/pod install
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
?? CocoaPods : 1.5.2
? ? ? ? Ruby : ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-darwin15]
? ? RubyGems : 2.6.8
? ? ? ? Host : macOS 15.1 (24B83)
?? ? ? Xcode : 16.0 (16A242d)
?? ? ? ? Git : git version 2.6.2
Ruby lib dir : /Applications/CocoaPods.app/Contents/Resources/bundle/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ fb48e7aeed4837192b4ec2e746127edb42dcdb88
```
### Plugins
```
cocoapods-check? ? ? ? ? : 1.0.0
cocoapods-deintegrate? ? : 1.0.2
cocoapods-plugins? ? ? ? : 1.0.0
cocoapods-plugins-install : 0.0.1
cocoapods-search? ? ? ? ? : 1.0.0
cocoapods-stats? ? ? ? ? : 1.0.0
cocoapods-trunk? ? ? ? ? : 1.3.0
cocoapods-try? ? ? ? ? ? : 1.1.0
```
### Podfile
```ruby
#source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
target 'ULVPN' do
pod 'AFNetworking'
pod 'SDWebImage'?
pod 'Masonry'?
pod 'YYKit'?
pod 'MBProgressHUD'
end
```
### Error
```
RuntimeError -[Xcodeproj]Unknown object version.
問(wèn)題修復(fù):
1.pod --version 查看當(dāng)前版本,我的是1.5.2 最新的是1.16.2,所以什么都不對(duì),終端執(zhí)行如下命令`sudo gem install cocoapods --pre`,然后更新cocoapods,檢查-verison 是否更新最新的版本,pod install 就可以了
2.檢查Xcode 選擇 taget 右邊狀態(tài)欄,Xcode版本改為Xcode14左右
3.rubuy環(huán)境默認(rèn)是2.6.0 改為最新的3.3.6,? 終端執(zhí)行如下方法:&?eval "$(rbenv init -)" ?rubuy更換才能生效,可百度