blakgeek / cordova-plugin-cocoapods-support

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

plugin removes previously installed Cordova pods #31

Closed djett41 closed 6 years ago

djett41 commented 7 years ago

I have a custom Cordova plugin that adds this plugin as a dependency. This plugin places my pods configuration in a config file platforms/ios/.pods.json

I also use the phonegap-push-plugin which uses the Cordova 6.X CLI to install pods for GoogleCloudMessaging and GGLInstanceID, which are configured in a file platforms/ios/pods.json

The problem is when this plugin runs, it will remove the existing pods in the Podfile (the push plugin pods) and add the pods form the plugin that reference the <pod element.

I would expect this plugin to be able to merge the Pods with Cordova 6.X pods.json file so plugins that also include pods will work as expected.

Using the Cordova 6.x CLI for pods is not an option for me currently since I need to include use_frameworks true, as well as using a tag for a specific pod.

Thanks!

djett41 commented 7 years ago

Any word on this? This is a big deal... every time a 3rd party plugin adds a cordova Pod, I have to manually add it to this plugin since this plugin doesnt merge with pods.json

This causes builds to fail

EugeneSnihovsky commented 6 years ago

@djett41 Hi! Did you found solution of your problem? I have same issue with this plugin and phonegap-push-plugin

EugeneSnihovsky commented 6 years ago

@djett41 I found solution. In my case I refused to use cordova-plugin-cocoapods-support and install my framework manually with cordova before_plugin_install hook

  1. Download framework from cdn and unzip it with hook
  2. Use path to framework in plugin.xml
    <framework src="src/xxx/xxx.framework" custom="true" embed="true" />

    As example I used cordova-plugin-twilio-video-v2preview. I can't find github source, so I run npm install cordova-plugin-twilio-video-v2preview and see code in node_modules

    • cordova-plugin-twilio-video-v2preview/hooks/node_before_add/fetch-twilio-video-ios.js
    • cordova-plugin-twilio-video-v2preview/plugin.xml
EugeneSnihovsky commented 6 years ago

Update: today I faced problem with publish app to itunes due to redundant framework architectures. And probably need this fix. For now I try to figure out how to implement it.