xcode - 如何从特定分支安装 pod?

标签 xcode git cocoapods podfile

我正在尝试通过 cocoapods 添加一个 pod,我正在使用 swift 3,而 pod( SQlite.swift )。

我正在尝试使用没有掌握最新的swift版本,但是有一个branch对于 swift 3。

那么我应该如何设置我的podfile来下载特定的分支呢?可能吗?

这是我的播客文件:

platform :ios, '10.0'

target 'RedShirt' do
  use_frameworks!

  # Pods for RedShirt
   pod 'SQLite.swift', :git => 'https://github.com/stephencelis/SQLite.swift.git'
end

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

最佳答案

podfile guide提到以下语法:

To use a different branch of the repo:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'dev'
                                                                             ^^^
                                                                   (the space is important)

所以在你的情况下,那将是:

pod 'SQLite.swift', :git => 'https://github.com/stephencelis/SQLite.swift.git', :branch => 'swift3-mariotaku'

关于xcode - 如何从特定分支安装 pod?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39930664/

相关文章:

ios - 找到满足 `Firebase/Functions` 依赖项的规范,但它们需要更高的最低部署目标

swift - 如何在 SpriteKit (Swift) 中获取施加在对象上的力

objective-c - 测试异常时 XCode 上的代码覆盖率结果不正确

iphone - 使用 Three20 和 iOS6 的架构 armv7s 的 undefined symbol

git - 如何为 "git add -p"中的帅哥设置制表符大小?

linux - 如何在远程克隆上 pull 更改

ruby-on-rails - ActionDispatch::Routing::Mapper 的未定义方法 `propfind'

ios - 将带有源的 Pod 依赖项添加到 .podspec

ios - iOS应用程序在PushViewController上崩溃,但仅在TestFlight中崩溃

ruby - 将自定义条目添加到 Cocoapods 生成的 acknowledgments.plist 中