When building an Hybrid iOS Cordova application (relying on Cordova CLI) I stumbled the need to build a custom plugin.
My workflow was the following:
cordova plugin rm and cordova plugin add to reinstall the plugin. I deployed the plugin successfully in the product, however this process of coding Objective C blindly with Vim and doing a whole push to GitHub just to test it in my project feels awkward, however I couldn't find any information on the internet about a better workflow.
Ideally, this is the workflow I'd expect:
Is this workflow achievable?
You could try the following workflow:
cordova prepare right after the copy step is completePersonally, I've used the same approach, with a twist:
I've coded the boilerplate part of the plugin using Sublime Text (vim works as well :) )
cordova plugin add --link ../path_to_my_plugin
I can add the platforms/android to Android Studio (you should be able to do the same with platforms/ios)
Any changes to the native part are reflected in the original sources (because of the --link parameter), any changes needed to the js part of the plugin I can edit directly in the app directory itself
Commit and push the files in your original plugin directory
If you need to reconfigure some part of the boilerplate (plugin.xml configurations), I've just:
cordova plugin remove <plugin-name>
And then resumed from step 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With