Skip to content

Commit 1092450

Browse files
authored
Merge branch 'main' into feat/android
2 parents 09a2cc2 + 5f15ae8 commit 1092450

12 files changed

Lines changed: 58 additions & 40 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Callstack Incubator
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
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)
1515
[![platform: Android](https://img.shields.io/badge/platform-android-green.svg?style=for-the-badge)](https://img.shields.io/badge/platform-android-green.svg)
16+
[![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/)
1617

1718
</div>
1819

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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@
7777
"node": ">=18"
7878
},
7979
"packageManager": "bun@1.1.0",
80-
"version": "0.4.0"
80+
"version": "0.4.1"
8181
}

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

0 commit comments

Comments
 (0)