# @norrix/client-sdk

Client SDK for Over-The-Air (OTA) updates with NativeScript using Norrix.

## Installation

```bash
npm install --save @norrix/client-sdk
```

## Usage

Initialize the Norrix client SDK in your NativeScript application as early as possible, typically in the `app.ts` or `main.ts` file.

```typescript
import { initNorrix } from '@norrix/client-sdk';

initNorrix({
  updateUrl: `https://norrix.net`,
  checkForUpdatesOnLaunch: true,
  installUpdatesAutomatically: true,
  downloadProgressCallback: (progress) => {
    console.log(`Download progress: ${progress}%`);
  },
  statusCallback(status, data) {
    console.log(`Status: ${status}`, data);
  },
});
```

## What can be updated?

- Anything inside your `/src` or `/app` folder (except the App_Resources folder)
- Anything inside your `/node_modules` folder

## What cannot be updated?

- NativeScript platform updates (e.g., bumping @nativescript/ios, @nativescript/android, @nativescript/visionos)
- Plugin updates that require a different version of native libraries
- Contents of the App_Resources folder (these are part of the native binary)
