从Cocoapods获得非主分支? [英] Getting non-master branch from Cocoapods?

查看:84
本文介绍了从Cocoapods获得非主分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 SwiftyJSON Alamofire 在一个项目中。最近,我下载了XCode 7 beta。 SwiftyJSON和Alamofire都为Swift 2提供了单独的非主分支。是否可以通过CocoaPods获得它们,还是需要以传统方式安装它们?

I've been using SwiftyJSON and Alamofire in a project. Recently I downloaded XCode 7 beta. Both SwiftyJSON and Alamofire have separate, non-master branches for Swift 2. Is there a way to get these via CocoaPods, or do I need to install them in the traditional way?

我尝试在CocoaPods网站上进行搜索,以查看这些分支是否已作为单独的Pod提交,但没有任何反应。我想知道是否有Podfile语法可以让您获得非主分支。

I tried searching on the CocoaPods website to see if these branches had been submitted as separate Pods, but nothing came up. I'm wondering if there is a Podfile syntax that allows you to get a non-master branch.

推荐答案

您可以指定任何

我正在使用Alamofire的示例:

Example I'm using for Alamofire:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0'

更改Podfile中的行,然后运行再次安装pod

Change the line(s) in your Podfile then run pod install again.

还有另一种语法:

pod 'Alamofire', git: 'https://github.com/Alamofire/Alamofire.git', branch: 'swift-2.0'

这篇关于从Cocoapods获得非主分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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