Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ if (await VersionCheck.needsUpdate()) {
bun add react-native-nitro-version-check
```

> **Version 2.x and newer requires Nitro 0.35+** — for earlier versions, use version 1.x
>
> Check the [full installation guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/installation) for platform setup and additional dependencies.

## Documentation

- [**Nitro Version Check** docs 📚](https://alshehriali0.github.io/react-native-nitro-version-check/)
- [**Getting Started** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/getting-started)
- [**Installation** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/installation)
- [**Compatibility** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/compatibility)
- [**API Reference**](https://alshehriali0.github.io/react-native-nitro-version-check/docs/api-reference)
- [**Migration Guide** from react-native-version-check](https://alshehriali0.github.io/react-native-nitro-version-check/docs/migration-guide)

Expand Down
368 changes: 97 additions & 271 deletions bun.lock

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions docs/docs/compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 3
title: Compatibility
---

# Compatibility

This page documents the compatibility between different versions of `react-native-nitro-version-check` and the Nitro ecosystem.

## Version Matrix

| `react-native-nitro-version-check` Version | `react-native-nitro-modules` | Status |
|---|---|---|
| v1.x | 0.32.0 - 0.34.x | Stable |
| v2.0.0+ | 0.35.0+ | Current |

## Nitro 0.35.0 and Later

**Version 2.x and newer is fully built around Nitro 0.35+ support.** All v1.x versions work with Nitro 0.32.0 - 0.34.x.

### Nitro 0.35.0 Improvements

Nitro 0.35.0 includes critical improvements and a memory leak fix in Kotlin HybridObjects. This required changes to:

- **Kotlin**: Regenerated specs with updated JNI initialization
- **Swift & C++**: Specs regenerated for compatibility

Version 2.x and newer leverage these improvements for better performance and stability.

### Upgrading from v1.x to v2.0.0+

When you're ready to upgrade to v2.0.0, ensure you have `react-native-nitro-modules` 0.35.0+:

```sh
bun add react-native-nitro-modules@0.35.0
bun add react-native-nitro-version-check@2.0.0
```

Then rebuild your app:

```sh
# For Expo
bunx expo prebuild --clean

# For bare React Native
cd ios && pod install
```

### Staying on v1.x

All v1.x versions work with Nitro 0.32.0 - 0.34.x. When you upgrade to Nitro 0.35.0+, you'll need to upgrade to v2.0.0+.
4 changes: 2 additions & 2 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ bun install

```sh
cd example
npx expo prebuild
bunx expo prebuild
bun run ios
```

### Android

```sh
cd example
npx expo prebuild
bunx expo prebuild
bun run android
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Getting Started

# Getting Started

**react-native-nitro-version-check** is a lightweight, fast version-checking library for React Native, powered by [Nitro Modules](https://github.com/mrousavy/nitro).
`react-native-nitro-version-check` is a lightweight, fast version-checking library for React Native, powered by [Nitro Modules](https://github.com/mrousavy/nitro).

It's a drop-in replacement for the unmaintained [`react-native-version-check`](https://github.com/kimxogus/react-native-version-check) — rewritten from scratch for performance.

Expand Down
11 changes: 8 additions & 3 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ bun add react-native-nitro-version-check
```

> Or use your preferred package manager (`npm`, `yarn`, etc.)
>
> **Version 2.x and newer requires Nitro 0.35.0+** — for earlier versions, see [Compatibility](/docs/compatibility)

### Nitro Modules

This library requires [react-native-nitro-modules](https://github.com/mrousavy/nitro). If you don't already have it installed, add it:
This library requires [`react-native-nitro-modules`](https://github.com/mrousavy/nitro). If you don't already have it installed, add it:

```sh
bun add react-native-nitro-modules
Expand All @@ -30,7 +32,7 @@ bun add react-native-nitro-modules
For Expo projects, run prebuild after installing:

```sh
npx expo prebuild
bunx expo prebuild
```

### Bare React Native
Expand All @@ -44,7 +46,10 @@ cd ios && pod install
## Requirements

- React Native 0.76+
- [react-native-nitro-modules](https://github.com/mrousavy/nitro) >= 0.32.0
- **v2.x+**: [`react-native-nitro-modules`](https://github.com/mrousavy/nitro) >= 0.35.0
- **v1.x**: [`react-native-nitro-modules`](https://github.com/mrousavy/nitro) >= 0.32.0

> See the [Compatibility](/docs/compatibility) guide to understand version requirements and migration paths.

## Verify installation

Expand Down
6 changes: 4 additions & 2 deletions docs/docs/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ Remove the old package and install the new one:
npm uninstall react-native-version-check

# Install new
bun add react-native-nitro-version-check react-native-nitro-modules
bun add react-native-nitro-version-check react-native-nitro-modules@latest
```

> **Nitro Version Requirement**: Version 2.x requires `react-native-nitro-modules` >= 0.35.0. See the [Compatibility guide](/docs/compatibility) for version-specific requirements.

## 2. Update imports

```ts
Expand Down Expand Up @@ -93,7 +95,7 @@ These are new and have no equivalent in the old library:
For Expo:

```sh
npx expo prebuild --clean
bunx expo prebuild --clean
```

For bare React Native:
Expand Down
2 changes: 1 addition & 1 deletion docs/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const sidebars: SidebarsConfig = {
{
type: "category",
label: "Getting Started",
items: ["getting-started", "installation"],
items: ["getting-started", "installation", "compatibility"],
},
{
type: "category",
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bun install

# 2. Generate native projects
cd example
npx expo prebuild
bunx expo prebuild

# 3. Run the app
bun run ios # iOS
Expand Down
15 changes: 11 additions & 4 deletions package/nitrogen/generated/android/NitroVersionCheckOnLoad.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 26 additions & 32 deletions package/nitrogen/generated/android/c++/JHybridVersionCheckSpec.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 19 additions & 22 deletions package/nitrogen/generated/android/c++/JHybridVersionCheckSpec.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading