nativescriptlibrariescode-sharing

Using Nativescript to build a Library for Third-Party Use


Just curious if anyone here has ever used Nativescript to build up a Library or if Nativescript is solely intended for building standalone apps.

If not, is the only way to share work done in Nativescript to have those third parties also rebuild their apps in Nativescript?


Solution

  • We call it plugins here, we have a bunch of plugins (free & paid) available in market place already.

    If you want to share your NativeScript works with a third party app written in native programming languages like Objective C / Java, it's still possible. Detailed instructions are documented here - iOS / Android

    But the ideal way is to write your libraries in native languages and import them in NativeScript at least until you could convince your consumers with native apps to include NativeScript runtime and follow a set of process.

    If you like your libraries to be used across platforms like ReactNative, Xamarin, Cordova etc., then you should write it in native language so users from any of these frameworks can consume your library with some effort. With NativeScript same can be directly used in app or you may write a simple JS wrapper around to make it more cross platform.