Hong Wei
Hong Wei

Reputation: 1407

How to specify dependencies for a pod

I am creating my own pods for sharing common code across several projects. I used 'pod lib create' to create a structure. Where do I specify the dependencies for my own pod? Do I do 'pod init' to create a new Podfile in the root directory of my pod?

Upvotes: 0

Views: 223

Answers (1)

danf
danf

Reputation: 2709

Dependencies are supposed to go in your Pod's podspec file, the simplest example can be : spec.dependency 'AFNetworking', '~> 1.0' spec.dependency 'RestKit/CoreData', '~> 0.20.0'

Note there are also spec.libraries and spec.frameworks, and subspecs if that's what you're aiming for - it's unclear from your question.

Upvotes: 3

Related Questions