Updated June 13, 2023
Introduction to NativeScript Plugin
NativeScript plugin is defined as a component in software terms through which a specific feature is added to an existing computer application written in NativeScript. NativeScript is an open-source framework that developers use to develop mobile applications used in Android and iOS. NativeScript falls under the genre of cross-platform software, and by the name, it means that the application platforms are agnostic.
Though some applications might need separate builds for separate platforms, others run on any platform without separate treatment. Applications built in NativeScript are built using JavaScript as the language, or for that matter of fact, any other language can also be used that can be source-to-source compiled to JavaScript. One such language is TypeScript.
Various NativeScript Plugins
As a matter of trivia, we know that more than 1500 plugins are available in NativeScript. Here we will see the most widely used plugins in the NativeScript avenue.
Plugin Name | Description of the Plugin |
nativescript | This plugin provides a command-line interface for developers to build NativeScript projects. |
@nativescript/core | This plugin provides libraries in JavaScript for developers by providing an easy-to-use API through which iOS and Android platform APIs can be accessed. |
@nativescript/hook | This plugin provides the means to install hooks into the project. The hook is a script that enables the execution of commands in the NativeScript command line. Not only that, it also simplifies the scripts’ installations and makes sure that they are saved in the right folder. |
@nativescript/webpack | This plugin enables webpack to be enabled for the programs in NativeScript. Using the webpack, one can enjoy a seamless development experience and provide an appetite for optimizations on page load time by reducing or parallelizing the requests made. |
proxy-lab | Proxy lab as a plugin is similar to a getter/setter function that enables developers to get, set, or clear any proxy-related settings in the NativeScript tooling. getProxySettings, setProxySettings, and clearProxySettings are the corresponding methods used in this plugin. |
@nativescript/schematics | This plugin enables developers to generate components in the NativeScript applications through the schematics present in the plugin and the medium of the Angular command line. |
nativescript-worker-loader | In continuation to the webpack plugin discussed, this plugin is a forked version of the official version of the worker loader for webpack. You can install the plugin by executing the npm i -D nativescript-worker-loader command. |
nativescript-intl | This plugin allows developers to use the Native date, time, or format similar to number formatting. This uses an API that is similar to Intl.js. |
@nativescript/tslint-rules | As the name suggests, this plugin consists of all the client rules required for building NativeScript applications. Tslint is a static analysis module that enables TypeScript to align the code to be highly readable, easy to maintain, and free f any functionality errors. |
nativescript-preview-sdk | This plugin enables developers to handle communication in any NativeScript Preview application. The NativeScript playground and the command line interface mainly use this plugin. |
@nativescript/theme | This plugin is the home to the core NativeScript theme. This houses the light and dark themes of styling and skins to enable the beautifying of the applications to add the core theme styling; the core CSS needs to be loaded along with the default skin. |
nativescript-permissions | As the name suggests, this plugin takes care of the Android permissions and applies to any Android version running above version 6. The plugin is launched under the MIT license, which means that this plugin can be used in any program. The require( ) method allows the plugin’s usage and allows developers to have two courses of action. |
nativescript-dev-xcode | This plugin gives developers the parser utility for any project files in xcodeproj. This also allows developers to edit the xcodeproject files and write them back out according to their needs. The mentioned plugin has been forked from Cordova-node-Xcode. |
@nativescript/android | This plugin comprises the Android runtime for NativeScript applications. This runtime is analogous to a bridge between JavaScript and Android. It performs the role of translator to the respective worlds, without which both the platforms are irrelevant to each other. |
@nativescript/ios | Likewise to the Android version we saw earlier, this plugin is for the iOS portion. Using this plugin, the XCode project must be prepared using the command ns to prepare ios, and subsequent folder and workspace creation tasks are done. |
@nativescript/xplat | This plugin adds a value pack to the Nx workspace, which enables generators for additional apps and supports architecture for other platform combinations. |
@nativescript/shared-notification-delegate | Some shortcomings concern the development of applications in iOS, and this plugin takes care of order to prevent those shortcomings during the iOS implementation. |
@nativescript/imagepicker | This plugin enables developers to implement multiple image pickers. This plugin supports iOS8+. Along with that, the plugin uses a QBImagePicker cocoa pod for development. Android intents open stock images and require explicit permission to read file storage. |
@nativescript/firebase | This plugin is likewise another important one in the NativeScript because this will enable smooth integration of NativeScript applications on the Firebase platform developed by Google, which is offered for application development. |
Conclusion
Here, we have tried to cover plugins that are widely used. At the same time, it is related to application development, and by now, we would have a fair idea of the kind of plugins that might be present in the portfolio of NativeScript that enables easy working while building of application using NativeScript.
Recommended Articles
This is a guide to NativeScript Plugin. Here we discuss the introduction and various NativeScript plugins for better understanding. You may also have a look at the following articles to learn more –