2017-10-20 91 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