Skip to content

Commit f044a82

Browse files
authored
Sample / 0.78.3 → 0.79.6 (#316)
Sample / 78.3 -> 0.79.6
1 parent 90eed89 commit f044a82

File tree

9 files changed

+1108
-950
lines changed

9 files changed

+1108
-950
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"@babel/core": "^7.25.2",
2929
"@babel/preset-env": "^7.25.3",
3030
"@babel/runtime": "^7.25.0",
31-
"@react-native-community/cli": "15.0.1",
32-
"@react-native-community/cli-platform-android": "15.0.1",
33-
"@react-native-community/cli-platform-ios": "15.0.1",
34-
"@react-native/babel-preset": "0.78.3",
35-
"@react-native/eslint-config": "0.78.3",
36-
"@react-native/metro-config": "0.78.3",
37-
"@react-native/typescript-config": "0.78.3",
31+
"@react-native-community/cli": "18.0.0",
32+
"@react-native-community/cli-platform-android": "18.0.0",
33+
"@react-native-community/cli-platform-ios": "18.0.0",
34+
"@react-native/babel-preset": "0.79.6",
35+
"@react-native/eslint-config": "0.79.6",
36+
"@react-native/metro-config": "0.79.6",
37+
"@react-native/typescript-config": "0.79.6",
3838
"@testing-library/react-native": "^13.3.1",
3939
"@tsconfig/react-native": "^3.0.6",
4040
"@types/jest": "^29.5.13",
@@ -46,7 +46,7 @@
4646
"jest": "^30.0.5",
4747
"prettier": "^3.2.5",
4848
"react": "19.0.0",
49-
"react-native": "0.78.3",
49+
"react-native": "0.79.6",
5050
"react-native-dotenv": "^3.4.9",
5151
"react-native-gesture-handler": "2.25.0",
5252
"react-native-gradle-plugin": "^0.71.19",

sample/Gemfile

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

sample/Gemfile.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,13 @@ PLATFORMS
111111

112112
DEPENDENCIES
113113
activesupport (>= 6.1.7.5, != 7.1.0)
114+
benchmark
115+
bigdecimal
114116
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
115117
cocoapods-check (= 1.1.0)
116118
concurrent-ruby (< 1.3.4)
119+
logger
120+
mutex_m
117121
xcodeproj (< 1.26.0)
118122

119123
RUBY VERSION

sample/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

sample/android/gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ if "$cygwin" || "$msys" ; then
204204
fi
205205

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

sample/ios/AppDelegate.swift

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,48 @@
1+
import UIKit
12
import React
23
import React_RCTAppDelegate
34
import ReactAppDependencyProvider
4-
import UIKit
55

66
@main
7-
class AppDelegate: RCTAppDelegate {
8-
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
9-
moduleName = "ReactNative"
10-
dependencyProvider = RCTAppDependencyProvider()
11-
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-
initialProps = [:]
15-
16-
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
17-
}
18-
19-
override func sourceURL(for _: RCTBridge) -> URL? {
20-
bundleURL()
21-
}
22-
23-
override func bundleURL() -> URL? {
24-
#if DEBUG
25-
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
26-
#else
27-
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
28-
#endif
29-
}
7+
class AppDelegate: UIResponder, UIApplicationDelegate {
8+
var window: UIWindow?
9+
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: "ReactNative",
28+
in: window,
29+
launchOptions: launchOptions
30+
)
31+
32+
return true
33+
}
34+
}
35+
36+
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
37+
override func sourceURL(for bridge: RCTBridge) -> URL? {
38+
self.bundleURL()
39+
}
40+
41+
override func bundleURL() -> URL? {
42+
#if DEBUG
43+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
44+
#else
45+
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
46+
#endif
47+
}
3048
}

0 commit comments

Comments
 (0)