Skip to content

Commit 9fab017

Browse files
committed
Update reproducer to latest React Native version
1 parent 5a6ff05 commit 9fab017

File tree

8 files changed

+438
-581
lines changed

8 files changed

+438
-581
lines changed

ReproducerApp/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function App(): React.JSX.Element {
6464
/*
6565
* To keep the template simple and small we're adding padding to prevent view
6666
* from rendering under the System UI.
67-
* For bigger apps the reccomendation is to use `react-native-safe-area-context`:
67+
* For bigger apps the recommendation is to use `react-native-safe-area-context`:
6868
* https://github.com/AppAndFlow/react-native-safe-area-context
6969
*
7070
* You can read more about it here:

ReproducerApp/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
88
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
99
gem 'xcodeproj', '< 1.26.0'
1010
gem 'concurrent-ruby', '< 1.3.4'
11+
12+
# Ruby 3.4.0 has removed some libraries from the standard library.
13+
gem 'bigdecimal'
14+
gem 'logger'
15+
gem 'benchmark'
16+
gem 'mutex_m'
Binary file not shown.

ReproducerApp/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.12-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

ReproducerApp/android/gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

ReproducerApp/ios/ReproducerApp/AppDelegate.swift

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,36 @@ import React_RCTAppDelegate
44
import ReactAppDependencyProvider
55

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

12-
// You can add your custom initial props in the dictionary below.
13-
// They will be passed down to the ViewController used by React Native.
14-
self.initialProps = [:]
10+
var reactNativeDelegate: ReactNativeDelegate?
11+
var reactNativeFactory: RCTReactNativeFactory?
1512

16-
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
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: "ReproducerApp",
28+
in: window,
29+
launchOptions: launchOptions
30+
)
31+
32+
return true
1733
}
34+
}
1835

36+
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
1937
override func sourceURL(for bridge: RCTBridge) -> URL? {
2038
self.bundleURL()
2139
}

ReproducerApp/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
},
1212
"dependencies": {
1313
"react": "19.0.0",
14-
"react-native": "0.78.2"
14+
"react-native": "0.79.0"
1515
},
1616
"devDependencies": {
1717
"@babel/core": "^7.25.2",
1818
"@babel/preset-env": "^7.25.3",
1919
"@babel/runtime": "^7.25.0",
20-
"@react-native-community/cli": "15.0.1",
21-
"@react-native-community/cli-platform-android": "15.0.1",
22-
"@react-native-community/cli-platform-ios": "15.0.1",
23-
"@react-native/babel-preset": "0.78.2",
24-
"@react-native/eslint-config": "0.78.2",
25-
"@react-native/metro-config": "0.78.2",
26-
"@react-native/typescript-config": "0.78.2",
20+
"@react-native-community/cli": "18.0.0",
21+
"@react-native-community/cli-platform-android": "18.0.0",
22+
"@react-native-community/cli-platform-ios": "18.0.0",
23+
"@react-native/babel-preset": "0.79.0",
24+
"@react-native/eslint-config": "0.79.0",
25+
"@react-native/metro-config": "0.79.0",
26+
"@react-native/typescript-config": "0.79.0",
2727
"@types/jest": "^29.5.13",
2828
"@types/react": "^19.0.0",
2929
"@types/react-test-renderer": "^19.0.0",

ReproducerApp/yarn.lock

Lines changed: 395 additions & 562 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)