How to write NativeScript plugins

There are many NativeScript plugins around already.
But what if a plugin is not available and you want to build your own?

In this article by Principal Developer Advocate TJ VanToll explains how to do that.

Although it much easier than creating a Cordova/Phonegap plugin, be aware you still have to know a bit Objective-C, Swift, and/or Java to get it done.