我正在尝试通过 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/