2

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'

1 Answers1

1

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://git@github.com/jimmy/OpenSSL.git'" />
LordParsley
  • 3,808
  • 2
  • 30
  • 41