How to write an Ionic plugin: The easy way.
Writing plugins for Ionic & Cordova just got a heck of a lot easier with the Ionic-plugin assistant.
Ionic is a wonderful framework to create hybrid mobile applications, but once you get comfortable with the framework, you’ll soon realize that while the official plugin list is extensive, it is not perfect, and often is lacking what you need.
Skip to Steps if you just want the solution, not the story.
That’s why last September, I wrote an article about how to create an Ionic plugin using Swift as the IOS language, not Objective-C. It served its purpose, and it was a learning experience for me to write about because there were very few updated tutorials about writing plugins in Swift at the time.
Even after writing that article, I often felt that the setup was a big hurdle for people to overcome, which is probably why the article only has a 40% read completion for users who open it.
So I set out to make an easier solution for getting started writing Ionic Ionic-Cordova Plugins: ionic-plugin-assistant. The ionic-plugin-assistant makes setting up a new plugin quick and painless.
Steps
- Install the package globally via
npm i -g ionic-plugin-assistant
- Run the command
ipa
in terminal - Answer a few basic questions about your plugin (name, description, etc…); and then you’re good to go.
Please note: Ionic-plugin-assistant is still under development. As a result, only the IOS plugin platform is complete, Android is on the way, so have no fear! :).
Then all you need to do is follow Ionic’s instructions for publishing your plugin when it’s tested & ready!
Check out some of my other articles for more useful solutions within the Ionic framework.
Questions?
You can find me on:
- GitHub: https://github.com/bengejd/
- Medium: https://medium.com/@JordanBenge
Who am I? My name is Jordan Benge, I am a Software Developer who loves helping others and contributing to Open-Source. I’ve been working in the Ionic Framework since Ionic 1, and have tried to keep up to date on the latest and greatest when it comes to Hybrid Mobile App Development.