AHHH! This NativeScript plugin doesn’t work

Keeping this short and to keep myself from having to repeat these instructions all the time for developers trying to understand the Android and iOS build process and how you need to  download and compile certain things with apps. Mainly since NativeScript is not running a webview and you can’t drop a javascript file and start working with third party libraries without a build step.

If you install a plugin for NativeScript that uses a native library for Android or iOS, follow the steps below and then send me a beer somehow.

  • Uninstall the old build you are running on your emulator/device.
  • Install the plugin into your app via the tns plugin add... command.
  • Run tns build android for Android apps or tns build ios for iOS.
  • Execute tns run android or tns run ios

That’s it! The plugin will now work, unless the maintainer(s) of the plugin just screwed things up 🙂 which I’ve done from time to time publishing plugins to npm.


If you care to know what those steps are actually doing, read on.

  1. Uninstalling an old build from the device/emulator will avoid any cache issues and continuing to run an old build without the third party native library will never work because it doesn’t exist in your compiled application.
  2. Installing the plugin just to make sure you have the plugin javascript source and the links to get the native dependencies.
  3. Create a new .apk or .ipa – during the build step the third party library will be downloaded and compiled into your executable assuming the plugin is configured correctly.
  4. Running the new executable will install the freshly built app onto your device or emulator.

If these steps don’t actually resolve the issue with using the plugin, you don’t owe me a beer.


6 thoughts on “AHHH! This NativeScript plugin doesn’t work

      1. Can I ask to point me to a simple but full and working example of how to use RadSideDrawer with {n} + angular? I need a module, component, html . with all imports and declarations because really I’me too new with {n} to understand how to implement a simple button to open the drawer…


      2. There is a sample somewhere. Possibly on the NativeScript ui website. I’d also suggest you join the slack channel, you can find the slack invite on the NativeScript.org site home page. You’ll get great help their from the community. I don’t use angular2 so I can’t say much about it personally.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s