Skip to content

Commit ebf5d0a

Browse files
committed
chore: document minimum React Native version (>= 0.78)
Set peerDependencies to react-native >= 0.78 and react >= 19.0.0, add requirements section to package README, add RN version badge to root README, and downgrade apps/demo to RN 0.78.2 for testing. Made-with: Cursor
1 parent dd45ab0 commit ebf5d0a

File tree

9 files changed

+31
-38
lines changed

9 files changed

+31
-38
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
[![npm downloads](https://img.shields.io/npm/dm/@callstack/react-native-sandbox.svg?style=for-the-badge)](https://www.npmjs.org/package/@callstack/react-native-sandbox)
1313
[![check](https://img.shields.io/github/actions/workflow/status/callstackincubator/react-native-sandbox/check.yml?style=for-the-badge)](https://github.com/callstackincubator/react-native-sandbox/actions/workflows/check.yml)
1414
[![platform: iOS](https://img.shields.io/badge/platform-iOS-blue.svg?style=for-the-badge)](https://img.shields.io/badge/platform-iOS-blue.svg)
15+
[![react-native >= 0.78](https://img.shields.io/badge/react--native-%3E%3D%200.78-61dafb.svg?style=for-the-badge&logo=react)](https://reactnative.dev/)
16+
1517

1618
</div>
1719

apps/demo/android/app/src/main/java/com/demo/MainApplication.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import android.app.Application
44
import com.facebook.react.PackageList
55
import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
7-
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
87
import com.facebook.react.ReactNativeHost
98
import com.facebook.react.ReactPackage
9+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
13+
import com.facebook.soloader.SoLoader
1214

1315
class MainApplication : Application(), ReactApplication {
1416

@@ -33,6 +35,9 @@ class MainApplication : Application(), ReactApplication {
3335

3436
override fun onCreate() {
3537
super.onCreate()
36-
loadReactNative(this)
38+
SoLoader.init(this, OpenSourceMergedSoMapping)
39+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
40+
load()
41+
}
3742
}
3843
}

apps/demo/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
compileSdkVersion = 35
66
targetSdkVersion = 35
77
ndkVersion = "27.1.12297006"
8-
kotlinVersion = "2.1.20"
8+
kotlinVersion = "2.0.21"
99
}
1010
repositories {
1111
google()

apps/demo/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

apps/demo/ios/Demo/AppDelegate.swift

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,15 @@ import React_RCTAppDelegate
44
import ReactAppDependencyProvider
55

66
@main
7-
class AppDelegate: UIResponder, UIApplicationDelegate {
8-
var window: UIWindow?
7+
class AppDelegate: RCTAppDelegate {
8+
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
9+
self.moduleName = "Demo"
10+
self.dependencyProvider = RCTAppDependencyProvider()
11+
self.initialProps = [:]
912

10-
var reactNativeDelegate: ReactNativeDelegate?
11-
var reactNativeFactory: RCTReactNativeFactory?
12-
13-
func application(
14-
_ application: UIApplication,
15-
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
16-
) -> Bool {
17-
let delegate = ReactNativeDelegate()
18-
let factory = RCTReactNativeFactory(delegate: delegate)
19-
delegate.dependencyProvider = RCTAppDependencyProvider()
20-
21-
reactNativeDelegate = delegate
22-
reactNativeFactory = factory
23-
24-
window = UIWindow(frame: UIScreen.main.bounds)
25-
26-
factory.startReactNative(
27-
withModuleName: "Demo",
28-
in: window,
29-
launchOptions: launchOptions
30-
)
31-
32-
return true
13+
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
3314
}
34-
}
3515

36-
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
3716
override func sourceURL(for bridge: RCTBridge) -> URL? {
3817
self.bundleURL()
3918
}

apps/demo/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ PODS:
20192019
- React-timing
20202020
- React-utils
20212021
- SocketRocket
2022-
- React-Sandbox (0.4.0):
2022+
- React-Sandbox (0.4.1):
20232023
- boost
20242024
- DoubleConversion
20252025
- fast_float
@@ -2451,7 +2451,7 @@ SPEC CHECKSUMS:
24512451
React-runtimeexecutor: 17c70842d5e611130cb66f91e247bc4a609c3508
24522452
React-RuntimeHermes: 3c88e6e1ea7ea0899dcffc77c10d61ea46688cfd
24532453
React-runtimescheduler: 024500621c7c93d65371498abb4ee26d34f5d47d
2454-
React-Sandbox: e3cf3c955559ed9f0bf014b29dce1e94600cd790
2454+
React-Sandbox: 9c091813e335735668c62b2d3dbeb1456f93d8a5
24552455
React-timing: c3c923df2b86194e1682e01167717481232f1dc7
24562456
React-utils: 9154a037543147e1c24098f1a48fc8472602c092
24572457
ReactAppDependencyProvider: afd905e84ee36e1678016ae04d7370c75ed539be

bun.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-native-sandbox/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
88
This is the **developer documentation** for installing and using `@callstack/react-native-sandbox` in your React Native application.
99

10+
## Requirements
11+
12+
- **React Native >= 0.78**
13+
- **New Architecture** (Fabric) enabled
14+
15+
This library uses `RCTReactNativeFactory`, C++ TurboModules, and Fabric component APIs that are only available starting from React Native 0.78. It does not include an Old Architecture / Bridge fallback.
16+
1017
## 📦 Installation
1118

1219
### npm/yarn

packages/react-native-sandbox/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
]
4545
},
4646
"peerDependencies": {
47-
"react": "*",
48-
"react-native": "*"
47+
"react": ">=19.0.0",
48+
"react-native": ">=0.78.0"
4949
},
5050
"devDependencies": {
5151
"react": "19.1.0",

0 commit comments

Comments
 (0)