ConfigsApr 15, 2026·3 min read

NativeScript — Build Truly Native iOS and Android Apps with JavaScript or TypeScript

NativeScript lets you build iOS and Android apps with one JavaScript/TypeScript codebase that renders to native UI widgets (not WebView). Direct access to every iOS and Android API from JS.

Introduction

NativeScript takes a different path from React Native: instead of a bridge between JS and native UI thread, it gives JavaScript direct access to every iOS and Android API. UI is declared (XML, or via Angular/Vue/Svelte/React) and maps to real UIView / UIViewController on iOS and real Android View / Activity on Android.

With over 25,000 GitHub stars, NativeScript is used by enterprises that need deep native access without writing Swift/Kotlin, as well as JavaScript developers who want to reuse npm packages in mobile apps. It supports ES2023+, TypeScript, and your framework of choice.

What NativeScript Does

NativeScript runs JavaScriptCore (iOS) or V8 (Android) embedded in a native app. Runtime bindings expose ALL platform APIs to JS (UIAlertController, AVAudioPlayer, android.widget.TextView, etc.). UI frameworks (Angular, Vue, Svelte, React) on top of a shared UI abstraction give you declarative templates. Output is a real native binary you ship through the App Store.

Architecture Overview

Your JS/TS code
      |
[Framework layer — optional]
   Angular / Vue / Svelte / React / vanilla
      |
[NativeScript UI abstraction]
   declares <Label>, <StackLayout>, <ListView>, etc.
      |
[Platform bridge]
   JSC (iOS) / V8 (Android) with direct bindings
   to every native API — no IPC, no bridge queue
      |
[Native platform]
   iOS: UIKit, AVFoundation, Core Data, etc.
   Android: android.view, android.app, etc.
      |
[App store: ipa / apk / aab]

Self-Hosting & Configuration

// app/app.ts (vanilla NativeScript)
import { Application, Frame } from "@nativescript/core";

Application.run({ moduleName: "main-page" });
<!-- main-page.xml -->
<Page>
  <StackLayout padding="20">
    <Label text="Hello NativeScript" fontSize="24" />
    <Button text="Press me" tap="{{ onTap }}" />
    <TextField hint="Type here" text="{{ message }}" />
  </StackLayout>
</Page>
// main-page.ts — direct access to iOS/Android APIs
import { Observable } from "@nativescript/core";
import { isIOS } from "@nativescript/core";

export function onNavigatingTo(args) {
  const vm = new Observable();
  vm.set("message", "");
  vm.set("onTap", () => {
    if (isIOS) {
      // Call any UIKit API directly from TS
      const alert = UIAlertController.alertControllerWithTitleMessagePreferredStyle(
        "Hi", vm.get("message"), UIAlertControllerStyle.Alert);
      alert.addAction(UIAlertAction.actionWithTitleStyleHandler("OK", UIAlertActionStyle.Default, null));
      // Get current VC and present
      Frame.topmost().ios.controller.presentViewControllerAnimatedCompletion(alert, true, null);
    }
  });
  args.object.bindingContext = vm;
}
# Common commands
ns run ios --emulator
ns run android --device
ns build ios --release --copy-to ./builds/
ns plugin add @nativescript/camera
ns update      # update NativeScript runtime
ns preview     # QR-code live preview on your phone

Key Features

  • True native UI — renders UIView / Android View, not WebView
  • Direct platform access — every iOS/Android API callable from JS/TS
  • Framework choice — Angular, Vue, Svelte, React, or vanilla
  • Code-sharing with web — reuse most business logic with your web app
  • Live preview — scan QR, see changes instantly on device
  • npm compatible — most pure-JS packages work
  • Plugin ecosystem — camera, geolocation, biometrics, payments
  • Enterprise-friendly — MDM, code-signing, enterprise distribution

Comparison with Similar Tools

Feature NativeScript React Native Flutter Capacitor Expo
Language JS/TS JS/TS Dart JS/TS JS/TS
UI layer Native views Native views (via bridge) Skia engine WebView Native (RN)
Direct platform API Yes (automatic bindings) Via native modules Via platform channels Via plugins Via SDK packages
Performance Close to native Close to native Near-native Web-ish Near-native
Ecosystem size Moderate Very large Large + growing Moderate Large
Best For Deep native access + JS JS devs, largest community Custom UI + performance Web-app-to-native RN + tooling-heavy

FAQ

Q: NativeScript vs React Native? A: Similar output (native views), different access model. NativeScript gives direct native API access from JS — no native module boilerplate. React Native has a much larger community and ecosystem. For deep native work, NativeScript; for ecosystem + jobs, RN.

Q: Is NativeScript still active? A: Yes — version 8.x ships regularly. OpenJS Foundation hosts the project; development continues with a smaller but committed team.

Q: What about performance? A: UI is genuinely native, so perceived performance is excellent. JS-native boundary calls are direct (no bridge queue like older RN), making some workloads faster than RN.

Q: Can I ship to Play Store / App Store? A: Yes — output is a real .ipa / .aab, same as any native app. You go through normal Apple/Google review.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets