M.A.Belfkih
M.A.Belfkih

Reputation: 31

How to use local CocoaPods dependencies for Cordova Plugin?

I'm developing a Cordova plugin, and I need to add local pods to my project.

for distant pods we can add them in our plugin.xml file using an xml tag like this :

 <framework src="OpenSSL" type="podspec" spec="~> 1.0.0" />

Once we add this tag and we add our plugin to our cordova project, a podfile containing this line pod 'OpenSSL' '~> 1.0.0' will be automatically generated.

The question is how can we add a local pod to have in our podfile a line like this : pod 'podName', path: '../myLocalPath'

Upvotes: 2

Views: 1475

Answers (1)

LordParsley
LordParsley

Reputation: 4048

In general, Cordova uses the spec field as whatever would normally come after the comma , in a Podfile. So all the options available here in the Cocoapods docs should work – see "Using the files from a local path.".

<framework src="OpenSSL" type="podspec" spec=":path => '/Users/Jimmy/OpenSSL'" />

Another handy option is a direct (even private with SSH configured) git repo:

<framework src="OpenSSL" type="podspec" spec=":git => 'ssh://[email protected]/jimmy/OpenSSL.git'" />

Upvotes: 1

Related Questions