Skip to content

Commit df3b044

Browse files
chrispadercodex
andcommitted
chore(example): upgrade to React Native 0.88
Align React and React Native tooling across the workspace, refresh the example's native dependencies and Harness, and adopt the iOS scene startup API. Co-authored-by: Codex <noreply@openai.com>
1 parent 8137684 commit df3b044

14 files changed

Lines changed: 697 additions & 598 deletions

File tree

‎.github/workflows/test-harness-android.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
run: ./gradlew :app:assembleDebug --no-daemon --build-cache -PreactNativeArchitectures=${{ env.TARGET_ANDROID_ARCH }}
8080

8181
- name: Run Android integration tests
82-
uses: callstackincubator/react-native-harness@v1.5.0
82+
uses: callstackincubator/react-native-harness@v1.6.0
8383
with:
8484
app: android/app/build/outputs/apk/debug/app-debug.apk
8585
runner: android

‎.github/workflows/test-harness-ios.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
run: xcrun simctl bootstatus "$IOS_SIMULATOR_UDID" -b
106106

107107
- name: Run iOS integration tests
108-
uses: callstackincubator/react-native-harness@v1.5.0
108+
uses: callstackincubator/react-native-harness@v1.6.0
109109
env:
110110
HARNESS_DEBUG: "1"
111111
with:

‎bun.lock‎

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

‎docs/bun.lock‎

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

‎docs/package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"fumadocs-ui": "16.9.2",
2121
"lucide-react": "1.17.0",
2222
"next": "16.2.6",
23-
"react": "19.2.3",
24-
"react-dom": "19.2.3"
23+
"react": "19.3.1",
24+
"react-dom": "19.3.1"
2525
},
2626
"devDependencies": {
2727
"@tailwindcss/postcss": "4.3.0",
2828
"@types/node": "25.9.1",
29-
"@types/react": "19.2.15",
30-
"@types/react-dom": "19.2.3",
29+
"@types/react": "19.3.0",
30+
"@types/react-dom": "19.3.0",
3131
"postcss": "8.5.15",
3232
"tailwindcss": "4.3.0",
3333
"typescript": "6.0.3",

‎example/ios/NitroSQLiteExample.xcodeproj/project.pbxproj‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = NitroSQLiteExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
3030
A7EB6D0F2DCB00010003AF01 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = NitroSQLiteExample/SceneDelegate.swift; sourceTree = "<group>"; };
3131
C3E89C92C507841F368080BD /* Pods_NitroSQLiteExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NitroSQLiteExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
32-
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
3332
D463F2F53B094E469119C69F /* load-file-with-error.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "load-file-with-error.sql"; path = "NitroSQLiteExample/load-file-with-error.sql"; sourceTree = "<group>"; };
33+
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
3434
/* End PBXFileReference section */
3535

3636
/* Begin PBXFrameworksBuildPhase section */
@@ -395,6 +395,13 @@
395395
"${PODS_ROOT}/React-featureflags",
396396
"${PODS_ROOT}/React-renderercss",
397397
"${PODS_ROOT}/React-bridging",
398+
"${PODS_ROOT}/React-Fabric/react/renderer/components/scrollview/platform/cxx",
399+
"${PODS_ROOT}/React-Fabric/react/renderer/components/scrollview/platform/ios",
400+
"${PODS_ROOT}/React-FabricComponents/react/renderer/textlayoutmanager/platform/ios",
401+
"${PODS_ROOT}/React-FabricComponents/react/renderer/components/text/platform/cxx",
402+
"${PODS_ROOT}/React-FabricComponents/react/renderer/components/textinput/platform/ios",
403+
"${PODS_ROOT}/React-FabricComponents/react/renderer/components/switch/iosswitch",
404+
"${PODS_ROOT}/React-cxxstableapi",
398405
);
399406
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
400407
LD_RUNPATH_SEARCH_PATHS = (
@@ -501,6 +508,13 @@
501508
"${PODS_ROOT}/React-featureflags",
502509
"${PODS_ROOT}/React-renderercss",
503510
"${PODS_ROOT}/React-bridging",
511+
"${PODS_ROOT}/React-Fabric/react/renderer/components/scrollview/platform/cxx",
512+
"${PODS_ROOT}/React-Fabric/react/renderer/components/scrollview/platform/ios",
513+
"${PODS_ROOT}/React-FabricComponents/react/renderer/textlayoutmanager/platform/ios",
514+
"${PODS_ROOT}/React-FabricComponents/react/renderer/components/text/platform/cxx",
515+
"${PODS_ROOT}/React-FabricComponents/react/renderer/components/textinput/platform/ios",
516+
"${PODS_ROOT}/React-FabricComponents/react/renderer/components/switch/iosswitch",
517+
"${PODS_ROOT}/React-cxxstableapi",
504518
);
505519
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
506520
LD_RUNPATH_SEARCH_PATHS = (
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
import UIKit
2-
import React
3-
import React_RCTAppDelegate
4-
import ReactAppDependencyProvider
52

63
@main
7-
class AppDelegate: UIResponder, UIApplicationDelegate {
8-
var window: UIWindow?
9-
10-
var reactNativeDelegate: ReactNativeDelegate?
11-
var reactNativeFactory: RCTReactNativeFactory?
12-
private(set) var launchOptions: [UIApplication.LaunchOptionsKey: Any]?
13-
4+
final class AppDelegate: UIResponder, UIApplicationDelegate {
145
func application(
156
_ application: UIApplication,
167
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
@@ -22,28 +13,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2213
UserDefaults.standard.set(loadFileFixturePath, forKey: "loadFileFixturePath")
2314
}
2415

25-
let delegate = ReactNativeDelegate()
26-
let factory = RCTReactNativeFactory(delegate: delegate)
27-
delegate.dependencyProvider = RCTAppDependencyProvider()
28-
29-
reactNativeDelegate = delegate
30-
reactNativeFactory = factory
31-
self.launchOptions = launchOptions
32-
3316
return true
3417
}
3518
}
36-
37-
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
38-
override func sourceURL(for bridge: RCTBridge) -> URL? {
39-
self.bundleURL()
40-
}
41-
42-
override func bundleURL() -> URL? {
43-
#if DEBUG
44-
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
45-
#else
46-
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
47-
#endif
48-
}
49-
}
Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,54 @@
11
import UIKit
2+
import React
23
import React_RCTAppDelegate
4+
import ReactAppDependencyProvider
35

4-
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
6+
final class SceneDelegate: RCTDefaultReactNativeFactoryDelegate, UIWindowSceneDelegate {
57
var window: UIWindow?
8+
var reactNativeFactory: RCTReactNativeFactory?
69

710
func scene(
811
_ scene: UIScene,
912
willConnectTo session: UISceneSession,
1013
options connectionOptions: UIScene.ConnectionOptions
1114
) {
1215
guard let windowScene = scene as? UIWindowScene else { return }
13-
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate,
14-
let factory = appDelegate.reactNativeFactory else {
15-
assertionFailure("React Native must be initialized before connecting a scene")
16-
return
17-
}
16+
17+
dependencyProvider = RCTAppDependencyProvider()
18+
let factory = RCTReactNativeFactory(delegate: self)
19+
reactNativeFactory = factory
1820

1921
let window = UIWindow(windowScene: windowScene)
2022
self.window = window
21-
appDelegate.window = window
23+
24+
#if DEBUG
25+
factory.devMenuConfiguration = RCTDevMenuConfiguration(
26+
devMenuEnabled: true,
27+
shakeGestureEnabled: true,
28+
keyboardShortcutsEnabled: true
29+
)
30+
#endif
2231

2332
factory.startReactNative(
2433
withModuleName: "NitroSQLiteExample",
2534
in: window,
26-
launchOptions: appDelegate.launchOptions
35+
connectionOptions: connectionOptions
2736
)
2837
}
38+
39+
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
40+
RCTLinkingManager.scene(scene, openURLContexts: URLContexts)
41+
}
42+
43+
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
44+
RCTLinkingManager.scene(scene, continue: userActivity)
45+
}
46+
47+
override func bundleURL() -> URL? {
48+
#if DEBUG
49+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
50+
#else
51+
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
52+
#endif
53+
}
2954
}

0 commit comments

Comments
 (0)