Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update / Install CocoaPods for specific target

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.

like image 507
Mykyta Savchuk Avatar asked Sep 08 '25 12:09

Mykyta Savchuk


1 Answers

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.

like image 160
Rashwan L Avatar answered Sep 10 '25 01:09

Rashwan L