2017-10-20 79 views

回答

3

我不認爲在CocoaPods中有任何pod update @targetName命令。你可以做的只是在你的單元測試目標中添加所需的pod,然後運行一個pod update,因爲其他目標沒有任何變化,那麼它們不會受到此更新的影響。

如果你添加目標所做後您的pod init你可以只這些目標追加到podfile,像這樣:

target 'ANewTargetAdded' do 
    inherit! :search_paths 
    pod 'SomePOD' 
    end 

如果你現在添加一個新的吊艙ANewTargetAdded和運行pod update,那麼這隻會影響ANewTargetAdded,如果您未對podfile中的其他目標進行任何更改。

1

沒有任何像pod update @targetName但您可以爲不同的目標和單元測試指定不同的窗格並運行pod update

就是這樣。

target 'TestProject' do 
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 

    # Pods for TestProject 

    target 'TestProjectTests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

    target 'TestProjectUITests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

end