Oleksandr Matrosov
Oleksandr Matrosov

Reputation: 27133

Podspec. Set s.dependency to download forked repo sources

I have a repo that I download via cocoa pods. This repo includes .podspec file which include s.dependency 'glm', '~> 0.9.4.6' line.

as I understood it will download it from here: https://github.com/g-truc/glm

I forked glm and now I want to use s.dependency that is connected to forked repo of glm. How can I specify it in podspec file to point that I need to download forked glm sources?

Upvotes: 2

Views: 2212

Answers (1)

danf
danf

Reputation: 2709

You can have CocoaPods override a location of a dependency's dependency in your Podfile, i.e. defining pod 'glm', :git => 'https://github.com/yourUser/yourFork.git'

You have to make sure the line where you specify your fork comes before the line that specifies the pod that uses it as a dependency.

See this answer about this topic, and this one about using forks with CocoaPods conveniently.

Upvotes: 4

Related Questions