swift - 尝试为图表版本 3.0.01 安装图表 Cocoa Pods,但我得到的是 3.0.5,为什么?

标签 swift swift3 charts cocoapods

我想安装 Cocoa Pods for Charts 版本 3.0.1,我一直在获取 3.0.5 版本。

这是我尝试的总结:

我的 Pod 文件:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

    > target 'TestRealm-Charts' do   # Comment this line if you're not using
    > Swift and don't want to use dynamic frameworks   use_frameworks!
    > 
    >   # Pods for TestRealm-Charts   pod 'RealmSwift', '~> 2.0.2'   pod
    > 'Charts', '~> 3.0.1'
    > 
    > post_install do |installer|
    >     installer.pods_project.targets.each do |target|
    >       target.build_configurations.each do |config|
    >         config.build_settings['SWIFT_VERSION'] = '3.0'
    >       end
    >     end   end end

保存后,我将其设置为使用以下命令安装: pod 安装

但是问题是一旦开始安装就显示版本是 安装图表 (3.0.5)

最佳答案

更改您的规范
'Charts', '~> 3.0.1'

'Charts', '= 3.0.1'

来自docs :

    Besides no version, or a specific one, it is also possible to use operators:

    = 0.1 Version 0.1.
    > 0.1 Any version higher than 0.1.
    >= 0.1 Version 0.1 and any higher version.
    < 0.1 Any version lower than 0.1.
    <= 0.1 Version 0.1 and any lower version.
    ~> 0.1.2 Version 0.1.2 and the versions up to 0.2, not including 0.2. 
This operator works based on the last component that you specify in your 
version requirement. The example is equal to >= 0.1.2 combined 
with < 0.2.0 and will always match the latest known version 
matching your requirements.

关于swift - 尝试为图表版本 3.0.01 安装图表 Cocoa Pods,但我得到的是 3.0.5,为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48686168/

相关文章:

swift - calendarItemsWithExternalIdentifier 的问题不认为它可以访问实体类型

ios - NSAttributedString.Key.writingDirection 上的 swift 4.2 崩溃

ios - 调整 collectionView.scrollToItem 考虑 inset?

c# - Firefox 中的 ASP.NET 图表呈现问题

swift - 访问字符串中的字符,Swift 3.x

ios - 分段控制位置随 Storyboard变化

ios - 将文本值从一个 View Controller 传递到另一个 View Controller

ios - webview 在 swift 3 中打开 native fb 应用程序?

c# - ASP.NET 条形图标签

javascript - Google 折线图 - 显示为 2K 的年份