Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: cocoa Pods: How do I add a new dependency to an existing pod?

Tags:

ios

cocoapods

I have juuuust started with Cocoa Pods.

I have this workspace now after initially experimenting and getting AFNetworking successfully connected via this Ray Wenderlich tutorial.

enter image description here

I want to now add in more dependencies like core-plot specifically. I found this link to a 'PodSpec' of Core-Plot

Problem is, I have no idea how to further implement this... Anyone have a quick run-down of what to mod and what commands in terminal to run?

like image 743
Beau D'Amore Avatar asked Oct 12 '13 04:10

Beau D'Amore


People also ask

How do you update a specific POD file?

When you run pod update SomePodName , CocoaPods will try to find an updated version of the pod SomePodName, without taking into account the version listed in Podfile. lock . It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile).


1 Answers

You need to add the pod in Podfile and do pod install from terminal that's it. The steps can be summarized as

  1. In terminal change the directory to your project directory containing *.xcodeproj
  2. Run open Podfile. Which opens the Podfile in textEdit.
  3. Add pod'CorePlot', '~> 1.4' to it and save.
  4. Run pod install -- NOTE* that is **pod update if already installed.

You are good to go.

like image 102
Anupdas Avatar answered Sep 19 '22 13:09

Anupdas