- 新版Xcode pod init 失敗
Xcode14
之后倚舀,使用 pod init
時,會失敗:
`force_encoding': can't modify frozen String (FrozenError)
需要修改 Project Document -> Project Format
為 Xcode 13.0
- error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
這是在使用 pod install
或者使用 pod update
時,經(jīng)常遇到的錯誤,詳細(xì)信息如下:
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
這是由于網(wǎng)絡(luò)原因固歪,訪問GitHub-pods倉庫時出現(xiàn)的錯誤,可多次嘗試運行指令胯努,運氣好的話牢裳,幾次之后就會成功;目前沒有特別好的解決方法康聂,有的說使用網(wǎng)絡(luò)代理可以徹底解決贰健,未嘗試,效果未知恬汁。
- CocoaPods was not able to update the cocoapods
repo
這也是在使用 pod install
或者使用 pod update
時遇到的錯誤伶椿,詳細(xì)信息如下:
[!] CocoaPods was not able to update the `cocoapods` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
根據(jù)提示,使用 pod repo update --verbose
指令嘗試氓侧,即可解決脊另。
- Showing Recent Issues Unable to load contents of file list: '/Users/username/Desktop/app/Pods/Target Support Files/Pods-projectname/Pods-projectname-resources-Debug-input-files.xcfilelist'
詳細(xì)報錯信息為:
Showing Recent Issues
Unable to load contents of file list: '/Users/username/Desktop/Workspace/app/Pods/Target Support Files/Pods-ProjectName/Pods-ProjectName-resources-Debug-input-files.xcfilelist'
Unable to load contents of file list: '/Users/username/Desktop/Workspace/app/Pods/Target Support Files/Pods-ProjectName/Pods-ProjectName-resources-Debug-output-files.xcfilelist'
Unable to load contents of file list: '/Users/username/Desktop/Workspace/app/Pods/Target Support Files/Pods-ProjectName/Pods-ProjectName-frameworks-Debug-input-files.xcfilelist'
Unable to load contents of file list: '/Users/username/Desktop/Workspace/app/Pods/Target Support Files/Pods-ProjectName/Pods-ProjectName-frameworks-Debug-output-files.xcfilelist'
這是因為本地安裝的cocoapods版本和拉取的項目中使用的cocoapods版本不一致導(dǎo)致的,可以將本地 cocoapods 刪除约巷,重新安裝和項目一致的版本即可偎痛;
查看版本信息:
$ pod --version
移除指定版本
$ sudo gem uninstall cocoapods -v 1.9.1
如果報權(quán)限錯誤,可使用
$ sudo gem uninstall -n /usr/local/bin cocoapods -v 1.9.1
安裝指定版本
$ sudo gem install cocoapods -v 1.8.4
如果報權(quán)限錯誤独郎,可使用
$ sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
最后踩麦,重新 pod install 即可!