• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - 添加新 pod 时出现 CocoaPods 问题

[复制链接]
菜鸟教程小白 发表于 2022-12-11 19:18:38 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我的 CocoaPods 工作正常,直到我尝试安装一个新的。
如果我尝试安装一个新的 pod,那么图表 pod 中有几个问题,否则它可以正常工作。
我如何解决它?

错误显示如下:

Issues in charts

我的 podfile 如下:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
use_frameworks!

target 'Tranquil' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks

# Pods for TranquillocationText
pod 'GooglePlaces'
pod 'UICircularProgressRing'
pod 'Alamofire', '~> 4.0' . //if i try to add this pod then error occurs
pod 'Charts'
end



Best Answer-推荐答案


注意:确保项目的 swift 语言版本。以下是您如何查看/检查您的 swift 语言版本的方法。

enter image description here


您有两个选项可以作为您的查询的解决方案:

  1. 如果你的项目有 Swift 版本 4.0
    - 你应该选择/下载与你项目的 swift 语言兼容的 POD(分享我 POD 信息和 swift 版本,所以我可以提供您适合项目的 pod 库的确切 pod 版本)。

  2. 如果您的项目的 swift 版本低于 4.0
    - 您需要将您的项目迁移到 Swift 4.0(如果您尚未迁移它)。这是引用问答,如何从 swift(下)<4.0 迁移到 4.0。


根据您在问题中添加的快照 - Swift 3.x 是您当前的项目语言版本和 pod 'Charts'正在支持 swift 4。

pod 'Charts'

这里是支持 Swift 4.0 以下版本的先前版本列表。

https://github.com/danielgindi/Charts/releases

尝试以前版本的 cosmos,例如:

pod 'Charts', '~> 3.0.3'
// or
pod 'Charts', '~> 3.0.2'
// or
pod 'Charts', '~> 3.0.1'

'

您可以从这里找到以前版本的 Alamofire(支持低于 4.0 的 Swift)的类似方法 - Alamofire - Releases

Swift 3.2 试试这个,看看:

platform :ios, '9.0'
use_frameworks!

target 'Tranquil' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks

# Pods for TranquillocationText
pod 'GooglePlaces'
pod 'UICircularProgressRing', '~> 1.7'
pod 'Alamofire', '~> 4.0'
pod 'Charts', '3.0.3'
pod 'SwiftyJSON', '3.0.0'

end

关于ios - 添加新 pod 时出现 CocoaPods 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47325742/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap