Jump to content

NativeScript

From Wikipedia, the free encyclopedia
NativeScript
Original authorTelerik by Progress Software.[1]
DeveloperOpenJS Foundation
Release2014 (2014)
Stable release
9.0.20[2] / May 27, 2026; 35 days ago (2026-05-27)
Written inJavaScript, TypeScript
PlatformCross-platform
LicenseApache License 2.0
Websitenativescript.org
Repository

NativeScript is a JavaScript-based cross-platform open-source development framework for building apps for iOS, visionOS, and Android platforms.[3] It connects platform APIs directly to the JavaScript runtime, combining Web development approaches such as CSS and view templating with platform languages including Swift, Kotlin, Objective-C, and Java.[4]

It was originally conceived and developed by Bulgarian company Telerik, later acquired by Progress Software.[5] At the end of 2019[6] stewardship of the NativeScript project transitioned to long-time Progress partner nStudio. In December 2020, NativeScript joined the OpenJS Foundation as an Incubating Project.[7] NativeScript apps are built using JavaScript, or by using any programming language that transpiles to JavaScript, such as TypeScript. NativeScript supports the Angular[8], Vue,[9] React,[10] Solid,[11] and Svelte frameworks.[12] Mobile applications built with NativeScript result in fully native apps, which use the same APIs as if they were developed in Xcode or Android Studio.[13] Additionally, software developers can re-purpose third-party libraries from CocoaPods, Maven, and npm.js in their mobile applications without the need for wrappers.[14][15][16]

Development

[edit]

NativeScript was publicly released first in March 2015. Version 1.0.0 followed two months later.[17] The framework quickly gained popularity reaching 3000 github-stars and over 1500 followers on Twitter soon after the public release.[18] In the meantime, over 700 plugins are available, which are either officially supported by Progress or stem from the open source community.[19][20] The use of Angular is an optional development approach allowing for application source code to be shared between the web platform and mobile platform.[21]

Structure

[edit]

NativeScript and related packages are installed using the package manager npm. Projects are created, configured, and compiled primarily through the NativeScript command-line interface and associated JavaScript tooling.[22] Historically, NativeScript also provided a graphical tool called NativeScript Sidekick.[23]

Platform-independent user interfaces are defined using XML files. NativeScript then uses the abstractions described in the XML files to call native UI elements of each platform. Application logic developed in Angular and TypeScript can be developed independent of the target platform as well. A NativeScript mobile application is built using the node.js runtime and tooling.[24] Progress aims for a ratio of 90% common code between the iOS and Android platforms.[1]

Direct access to native platform APIs and controls

[edit]

Platform-independent user interfaces are defined using XML files.[25] NativeScript uses the XML data structures representing the cross platform abstraction to trigger platform-specific code that directly interacts with the native elements of the target operating system. This means a call to the NativeScript Button API provides a UI abstraction for Button, which directly calls UIButton on iOS[26] or com.android.widget.Button on Android.[27]

While application source code is written in JavaScript, TypeScript, Angular, or Vue.js, the source code is not compiled or otherwise mutated. The source code as-is runs directly on the device. This architectural choice eliminates the need for cross-compiling or transpiling.[16] Additionally, while the application source code is written in languages commonly encountered in a browser (or in a WebView-contained mobile application) NativeScript applications run directly on the native device. There is no DOM manipulation or any mandatory browser interaction.[8]

Notable features

[edit]

Native API reflection

[edit]

Another notable feature is the use of reflection to handle native API endpoints. Rather than requiring separate binding layers between NativeScript and each mobile platform API, NativeScript uses reflection to gain information and metadata about the native platform APIs. New features added to any native platform API are available immediately.[8]

Another way the reflection feature is used is in working with third party libraries. As JavaScript (or TypeScript/Angular) can talk directly to native code, there is no need to write binding layers in Objective-C, Swift, Java or Kotlin.[16][28]

Angular integration

[edit]

With the launch of NativeScript 2.0, it is possible to use Angular to build cross-platform mobile applications.[29] Additionally, when using Angular with NativeScript you have the ability to share large chunks of code between your web and mobile apps.[30]

Vue.js integration

[edit]

The Vue.js framework is supported in NativeScript via the nativescript-vue plugin.[9]

Supporting tools and services

[edit]
  • The NativeScript command-line interface is used to create, configure, build, and run NativeScript applications.[31]
  • NativeScript Preview allows you to run apps in the browser from StackBlitz.[32]
  • Norrix allows you to build, update and submit NativeScript apps to the App Store and Google Play.[33]
  • NativeScript Marketplace lists community and ecosystem plugins for NativeScript applications.[34]
  • NativeScript Sidekick and NativeScript Playground were historical tools associated with the ecosystem.[35]

References

[edit]
  1. 1 2 "Frequently asked questions about NativeScript". NativeScript.org. Archived from the original on 2016-03-18. Retrieved 2016-03-20.
  2. "NativeScript 9.0.20". GitHub. Retrieved 28 June 2026.
  3. "Developing with visionOS". NativeScript Docs. Retrieved 21 June 2026.
  4. "NativeScript Docs". NativeScript Docs. Retrieved 21 June 2026.
  5. "Creating Mobile Native Apps in JavaScript with NativeScript". InfoQ. Archived from the original on 2022-06-19. Retrieved 2022-07-12.
  6. Saripella, Surya. "The Next Chapter for NativeScript: nStudio". NativeScript. Archived from the original on 2021-01-16. Retrieved 2022-07-12.
  7. Romoff, Rachel (7 December 2020). "NativeScript joins OpenJS Foundation as Incubating Project". OpenJS Foundation. OpenJS Foundation. Archived from the original on 25 January 2021. Retrieved 21 June 2026.
  8. 1 2 3 Krill, Paul (March 10, 2015). "JavaScript goes native for iOS, Android, and Windows Phone apps". InfoWorld. Archived from the original on January 3, 2022. Retrieved July 12, 2022.
  9. 1 2 "NativeScript-Vue". nativescript-vue.org. Retrieved 2017-10-31.
  10. "Introduction". React NativeScript. Retrieved 21 June 2026.
  11. "@nativescript-community/solid-js". Github NativeScript Community. Retrieved 21 June 2026.
  12. "Svelte Native". Github NativeScript Community. Retrieved 21 June 2026.
  13. "NativeScript framework eases cross-platform app development woes". searchcloudcomputing.techtarget.com. Archived from the original on 2021-08-06. Retrieved 2021-08-06.
  14. Krill, Paul (May 6, 2016). "NativeScript warms up to AngularJS for mobile dev". InfoWorld. Archived from the original on June 12, 2022. Retrieved July 12, 2022.
  15. "SD Times GitHub Project of the Week: NativeScript". March 18, 2016. Archived from the original on March 27, 2022. Retrieved July 12, 2022.
  16. 1 2 3 "Telerik's NativeScript Aims To Centralize Cross-Platform Mobile Development -". Visual Studio Magazine. Archived from the original on 2017-11-07. Retrieved 2016-11-21.
  17. "NativeScript 1.0.0 Released". www.i-programmer.info. Archived from the original on 2022-06-11. Retrieved 2022-07-12.
  18. "NativeScript 1.0.0 is now available". NativeScript.org. Archived from the original on 2016-10-05. Retrieved 2016-11-04.
  19. "NativeScript Marketplace". market.nativescript.org. Archived from the original on 2018-03-15. Retrieved 2018-03-14.
  20. "nativescript - npm search". www.npmjs.com. Archived from the original on 2017-02-11. Retrieved 2016-11-21.
  21. "Getting to Know Angular 2". mobile.htmlgoodies.com. 15 November 2016. Archived from the original on 27 September 2019. Retrieved 12 July 2022.
  22. "Environment Setup". NativeScript Docs. Retrieved 21 June 2026.
  23. "NativeScript Sidekick - your faithful companion for app development". NativeScript.org. Archived from the original on 2017-11-07. Retrieved 2017-10-31.
  24. Hanna, Tam (9 August 2016). "Mit JavaScript wie hausgemacht: NativeScript". Developer. Archived from the original on 2021-07-25. Retrieved 2022-07-12.
  25. "The Basics - NativeScript Docs". docs.nativescript.org. Archived from the original on 2016-11-21. Retrieved 2016-11-21.
  26. "NativeScript/NativeScript". github.com. Archived from the original on 2022-06-20. Retrieved 2022-06-20.
  27. "NativeScript/NativeScript". github.com. Archived from the original on 2022-06-20. Retrieved 2022-06-20.
  28. "Accessing Native APIs through JavaScript - NativeScript Docs". docs.nativescript.org. Archived from the original on 2016-11-24. Retrieved 2016-11-21.
  29. "NativeScript 2.0 - the best way to build cross-platform native mobile apps". NativeScript.org. Archived from the original on 2016-12-20. Retrieved 2016-11-21.
  30. Witalec, Sebastian (2018-08-24). "Apps That Work Natively on the Web and Mobile". Medium. Archived from the original on 2022-01-03. Retrieved 2021-08-06.
  31. "Environment Setup". NativeScript Docs. Retrieved 21 June 2026.
  32. "NativeScript Preview". NativeScript Preview. Retrieved 21 June 2026.
  33. "Norrix". Norrix. Retrieved 21 June 2026.
  34. "NativeScript Marketplace". NativeScript Marketplace. Retrieved 21 June 2026.
  35. "NativeScript Sidekick - your faithful companion for app development". NativeScript.org. Archived from the original on 2017-11-07. Retrieved 2017-10-31.
[edit]