如何使用特定版本的CocoaPods [英] How to use a specific version of CocoaPods

查看:221
本文介绍了如何使用特定版本的CocoaPods的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在升级或安装Podfile时以某种方式指定我想使用的CocoaPods版本?我遇到过几次Podfiles只能与CocoaPods的一个版本一起正常工作,而不能与其他版本一起工作的情况。

Is it possible to somehow specific the version of CocoaPods I'd like to use when upgrading or installing a Podfile? I've encountered several times where Podfiles work correctly with one version of CocoaPods but not with others.

例如,我要查找的语法如下:

For example, the syntax I'm looking for is like the following:

pod -v 0.34 install


推荐答案

由于CocoaPods是通过RubyGems安装的,因此可以使用它们的机制来完成此操作。如此处所述,您可以执行

Since CocoaPods is installed through RubyGems you can use their mechanisms for doing this. As outlined here you can do this:

pod _0.34.0_ install

您可以验证它是否可以使用:

You can verify this is working with:

pod _0.34.0_ --version

我也强烈建议不要这样做。我绝对建议您保持CocoaPods为最新,并根据需要更改Podfile以适应新版本。如果我们更改最低版本号,则您的旧版本随时可能会按预期停止运行。

Also I would highly advise against doing this at all. I would definitely recommend you keep CocoaPods up to date and change your Podfile as needed to adapt to new versions. At anytime your old version could stop working as expected if we bump the minimum version number.

这篇关于如何使用特定版本的CocoaPods的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆