2016-10-08 64 views
24

我想添加一個由cocoapods的莢,我使用的是swift 3,而莢(SQlite.swift)。如何從特定分支安裝吊艙?

我試圖使用不具備的最新版本迅速的高手,但有是迅速3.

我應該那麼如何設置我的podfile下載特定分支branch?可能嗎?

這裏是我的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 

回答

61

podfile guide提到的語法如下:

要使用回購的不同分支:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'dev' 

因此,在您情況下,那將是:

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

標記語法':tag =>'1.0.0'' –

+3

@AndrewMorris真。並提交語法:':commit =>'0f506b1c45'' – VonC