Reputation: 1225
Is it possible to do pod install @targetName
?
I stuck with a problem that I do not have an option to update pods for my project but I have to install new pods for my unit tests target.
Upvotes: 4
Views: 9036
Reputation: 38833
I don´t think there is any pod update @targetName
command in CocoaPods. What you can do is to add the desired pod in your unit test target only and then run a pod update
, since there is not any changes in the other targets then they will not be affected by this update.
And if you add targets after you have made your pod init
you can just append these targets to your podfile, like this:
target 'ANewTargetAdded' do
inherit! :search_paths
pod 'SomePOD'
end
If you now add a new pod to ANewTargetAdded
and run pod update
, then this will only affect ANewTargetAdded
if you haven´t made any changes to your other targets in your podfile
.
Upvotes: 5
Reputation: 19156
There isn't any like pod update @targetName
but you can specify different pods for different targets and unit tests and run pod update
.
Something like this.
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
Upvotes: 2