Skip to Content
Client SDKInstallation

SDK Installation

Install via npm

npm install @norrix/client-sdk

Platform Support

PlatformMinimum NativeScript Version
iOS8.0.0
Android8.0.0

Applying an update in the current process (a soft reboot, instead of waiting for the next cold launch) needs a runtime that exposes NativeScriptRuntime.reloadApplication. The @nativescript/ios 9.1.0 release does not (a 9.1.x patch adds it), so on it and on older runtimes the SDK falls back to a process restart with the same result.

What’s Included

The SDK package includes:

TypeScript SDK

The main SDK code for checking and applying OTA updates.

Native Modules

Pre-built native libraries for OTA loading:

  • iOS: NorrixOTA.xcframework
  • Android: NorrixAndroidOTA.aar

These pick the bundle to boot before the JavaScript runtime starts, and record a launch that never reached it.

NativeScript Hooks

Automatically configured hooks that run during ns prepare:

HookTypeDescription
norrix-ota-iosafter-prepareConfigures iOS OTA loading
norrix-ota-androidafter-prepareConfigures Android OTA loading

The hooks are defined in the package.json and executed automatically.

On iOS the hook patches the boot file (main.m, or NativeScriptStart.m on visionOS) to route the base directory through [NorrixOTA applicationPathWithDefault:baseDir], and to call [NorrixOTA runMainApplicationDidReturn] after runMainApplication. That call only ever runs when the JavaScript bootstrap failed before reaching UIApplicationMain, which is how a bundle that cannot start is detected.

Upgrading to @norrix/client-sdk 3.x changes the native loader, so publish a new store build before publishing OTA updates for it. Devices still on an older binary keep the loader they shipped with.

On-device Layout

The SDK owns one directory, shared with the native loader:

PathContents
norrix_ota/state.jsonInstalled updates, launch outcomes, quarantined ids
norrix_ota/<updateId>-<platform>/An installed update, with its norrix-install.json marker
norrix_ota/.tmp-<updateId>-<platform>/An install in progress; ignored by the loader

The root is <Documents>/norrix_ota on iOS and <filesDir>/norrix_ota on Android.

Dependencies

The SDK installs these dependencies:

PackagePurpose
@nativescript/zipExtracting OTA update bundles

Peer Dependencies

The SDK expects these to be in your project:

PackageVersion
@nativescript/core^8.0.0 or ^9.0.0

Verification

After installation, verify the SDK is available:

import { initNorrix } from '@norrix/client-sdk'; // If this compiles, the SDK is installed correctly

Project Structure

After installation, your project should include:

node_modules/ @norrix/ client-sdk/ dist/ # Compiled SDK code platforms/ ios/ # iOS native module android/ # Android native module scripts/ # NativeScript hooks

Next Steps