CocoaPods-使用特定的Pod版本 [英] CocoaPods - use specific pod version

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

问题描述

我正在将CocoaPods用于macOS应用程序。我在AFNetworking(当前版本1.2.1)中遇到编译错误,发现这些错误在先前版本(1.2.0)中不存在。

I am using CocoaPods for a macOS app. I have compilation errors with AFNetworking (current version, 1.2.1) and saw that these didn't exist in the previous version (1.2.0).

我做了一些研究,但没有发现定义Pod版本的可能性(例如,版本1.2.0代替1.2.1)。

I did some research but did not find a possibility to define the version of a pod (for example, version 1.2.0 instead of 1.2.1).

这是否可能,或者我必须等到该库有新版本吗?

Is this possible or do I have to wait until there is a new version of that library?

推荐答案

在您的Podfile中:

In your Podfile:

pod 'AFNetworking', '1.2.0'

http:上检查开始使用: //cocoapods.org

完成后,您可以在其中发布 pod更新进行更改的终端。当然,这需要在项目的顶级文件夹中完成。如果未进行更新,请编辑您的 Podfile.lock 文件,并将AFNetworking版本号更改为小于当前版本的值,然后发出 pod更新再次在终端中。这告诉CocoaPods您安装了其他版本,并且必须更新。

Once this is done, you can then issue a pod update in the terminal for the change to take place. Of course, this needs to be done from your project's top level folder. If the update does not occur, edit your Podfile.lock file and change the AFNetworking version # to something less than what it is and issue a pod update in the terminal again. This tells CocoaPods that you have a different version installed and that it must update.

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

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