我想安装 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/