Skip to content

Overview ​

ota-nativescript delivers signed over-the-air JavaScript and asset updates for NativeScript 9.1+ release builds without forking @nativescript/ios or @nativescript/android.

Why NativeScript needs a native pre-boot layer ​

Treating OTA updates in NativeScript as a JavaScript file copy breaks in three concrete ways:

  1. Broken updates cannot recover themselves. If a staged bundle throws on its first module import, no JavaScript rollback code executes. Bundle selection and launch-attempt tracking must execute in native code before V8 boots.
  2. Asset paths and runtime extraction collide. On Android, knownFolders.currentApp() resolves to files/app, while RuntimeHelper overwrites files/app when the APK changes. Overwriting files/app destroys the embedded fallback; loading JS from another directory without aligning files/app mixes stale ~/... assets with new JS.
  3. "Only TypeScript changed" is not a compatibility guarantee. NativeScript generates platform metadata (metadata-*.bin, *.dat) and static native bindings (sbg-bindings.txt) during the binary build. A bundle calling native APIs or registering subclasses absent from the installed binary fails at runtime.

Packages ​

PackageRoleStatus
@getcortexlabs/ota-protocolManifest/directive/boot-state schemas, RFC 8785 JCS canonicalization, path safety and error codesVerified
@getcortexlabs/ota-nativescriptNative iOS & Android boot selectors, CryptoKit / Google Tink Ed25519 + SHA-256 verification, background downloader, atomic staging, updates SDK and after-prepare hookVerified
@getcortexlabs/ota-cliota-ns CLI: keygen, per-platform fingerprint, Webpack pack, offline verify and local fault-injection serveNew

Server-agnostic by design ​

The on-device SDK speaks an explicit, signed HTTP contract (POST /check, signed manifest.json, immutable file URLs, optional POST /events). You can host releases on static object storage + any backend, test locally with ota-ns serve, or connect Orbit once the hosted control plane lands.

What can ship over the air ​

ChangeOTA eligible?
Bug fixes in TypeScript/JavaScript logic or validationYes, when compatible with existing native metadata and bindings
Layout, style, copy, images and updatable fonts (~/...)Yes
Adding or updating an iOS Pod, SPM package, Gradle dependency or permissionNo — requires a new store binary
Upgrading @nativescript/ios, @nativescript/android or native bootstrapper codeNo — requires a new store binary
Calling a native API or adding a native subclass missing from build metadataNo — caught by ota-ns fingerprint / pack