- 新版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
时,经常遇到的错误,详细信息如下:
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
这是由于网络原因,访问GitHub-pods仓库时出现的错误,可多次尝试运行指令,运气好的话,几次之后就会成功;目前没有特别好的解决方法,有的说使用网络代理可以彻底解决,未尝试,效果未知。
- CocoaPods was not able to update the cocoapods
repo
这也是在使用 pod install
或者使用 pod update
时遇到的错误,详细信息如下:
[!] 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`
根据提示,使用 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'
详细报错信息为:
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版本不一致导致的,可以将本地 cocoapods 删除,重新安装和项目一致的版本即可;
查看版本信息:
$ pod --version
移除指定版本
$ sudo gem uninstall cocoapods -v 1.9.1
如果报权限错误,可使用
$ sudo gem uninstall -n /usr/local/bin cocoapods -v 1.9.1
安装指定版本
$ sudo gem install cocoapods -v 1.8.4
如果报权限错误,可使用
$ sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
最后,重新 pod install 即可!