blakgeek / cordova-plugin-cocoapods-support

A Cordova/PhoneGap plugin to add support for CocoaPods dependencies.
MIT License
72 stars 72 forks source link

Using local pod / podspec #45

Open JimmyYezeguelian opened 5 years ago

JimmyYezeguelian commented 5 years ago

Hi,

I'm wondering if the plugin allows us to use local pod ? I'm developing a SDK and want to create a cordova plugin before release it on a cocoapods spec repo.

Thanks a lot in advance.

bbjay commented 5 years ago

Hi, something like <pod name="YourSDK" spec=":path => '../pathTo/YourSDK.podspec'" /> in your plugin.xml should work.

The problem with this is, that the path to your podspec may be dependent on the project name. As a workaround, I simply copied my plugin to the www directory by also adding <asset src="src/ios/YourSDK" target="YourSDK" /> and used <pod name="YourSDK" spec=":path => 'www/YourSDK/YourSDK.podspec'" /> instead, which works in every case.