Skip to content

Commit b0616ed

Browse files
committed
update RN dependencies
1 parent 28ce5b2 commit b0616ed

File tree

20 files changed

+54
-65
lines changed

20 files changed

+54
-65
lines changed

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ['module:@react-native/babel-preset'],
33
};

packages/engine-rn-macos/src/adapters/babelAdapter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {
55

66
return {
77
retainLines: true,
8-
presets: ['module:metro-react-native-babel-preset'],
8+
presets: ['module:@react-native/babel-preset'],
99
...cnf,
1010
plugins: [
1111
[

packages/engine-rn-tvos/src/adapters/babelAdapter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {
55

66
return {
77
retainLines: true,
8-
presets: ['module:metro-react-native-babel-preset'],
8+
presets: ['module:@react-native/babel-preset'],
99
...cnf,
1010
plugins: [
1111
[

packages/engine-rn-tvos/templates/platforms/androidtv/gradle.properties

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
2727
# Automatically convert third-party libraries to use AndroidX
2828
android.enableJetifier={{ENABLE_JETIFIER}}
2929

30-
# Version of flipper SDK to use with React Native
31-
FLIPPER_VERSION=0.182.0
32-
3330
# Use this property to specify which architecture you want to build.
3431
# You can also override it from the CLI using
3532
# ./gradlew <task> -PreactNativeArchitectures=x86_64

packages/engine-rn-tvos/templates/platforms/firetv/gradle.properties

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
2727
# Automatically convert third-party libraries to use AndroidX
2828
android.enableJetifier={{ENABLE_JETIFIER}}
2929

30-
# Version of flipper SDK to use with React Native
31-
FLIPPER_VERSION=0.182.0
32-
3330
# Use this property to specify which architecture you want to build.
3431
# You can also override it from the CLI using
3532
# ./gradlew <task> -PreactNativeArchitectures=x86_64

packages/engine-rn-tvos/templates/platforms/tvos/Podfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ target 'RNVApp' do
2020
config = use_native_modules!
2121
platform :ios, '{{PLUGIN_DEPLOYMENT_TARGET}}'
2222

23-
# Flags change depending on the env values.
24-
flags = get_default_flags()
23+
2524

2625
use_react_native!(
2726
:path => config[:reactNativePath],
@@ -43,8 +42,7 @@ target 'RNVApp-tvOS' do
4342
config = use_native_modules!
4443
platform :tvos, '{{PLUGIN_DEPLOYMENT_TARGET}}'
4544

46-
# Flags change depending on the env values.
47-
flags = get_default_flags()
45+
4846

4947
use_react_native!(
5048
:path => config[:reactNativePath],
@@ -70,5 +68,5 @@ post_install do |installer|
7068
config[:reactNativePath],
7169
:mac_catalyst_enabled => false
7270
)
73-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
71+
7472
end

packages/engine-rn-tvos/templates/platforms/tvos/RNVApp-tvOS/Info.plist

+5-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@
2424
<true/>
2525
<key>NSAppTransportSecurity</key>
2626
<dict>
27-
<key>NSExceptionDomains</key>
28-
<dict>
29-
<key>localhost</key>
30-
<dict>
31-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
32-
<true/>
33-
</dict>
34-
</dict>
27+
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
28+
<key>NSAllowsArbitraryLoads</key>
29+
<false/>
30+
<key>NSAllowsLocalNetworking</key>
31+
<true/>
3532
</dict>
3633
<key>NSLocationWhenInUseUsageDescription</key>
3734
<string></string>

packages/engine-rn-tvos/templates/platforms/tvos/RNVApp/AppDelegate.mm

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1515
}
1616

1717
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18+
{
19+
return [self getBundleURL];
20+
}
21+
- (NSURL *)getBundleURL
1822
{
1923
#if DEBUG
2024
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

packages/engine-rn-tvos/templates/platforms/tvos/RNVApp/Info.plist

+5-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,11 @@
2626
<true/>
2727
<key>NSAppTransportSecurity</key>
2828
<dict>
29-
<key>NSExceptionDomains</key>
30-
<dict>
31-
<key>localhost</key>
32-
<dict>
33-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
34-
<true/>
35-
</dict>
36-
</dict>
29+
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
30+
<key>NSAllowsArbitraryLoads</key>
31+
<false/>
32+
<key>NSAllowsLocalNetworking</key>
33+
<true/>
3734
</dict>
3835
<key>NSLocationWhenInUseUsageDescription</key>
3936
<string></string>

packages/engine-rn-windows/src/adapters/babelAdapter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {
55

66
return {
77
retainLines: true,
8-
presets: ['module:metro-react-native-babel-preset'],
8+
presets: ['module:@react-native/babel-preset'],
99
...cnf,
1010
plugins: [
1111
[

packages/engine-rn/src/adapters/babelAdapter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {
55

66
return {
77
retainLines: true,
8-
presets: ['module:metro-react-native-babel-preset'],
8+
presets: ['module:@react-native/babel-preset'],
99
...cnf,
1010
plugins: [
1111
[

packages/engine-rn/templates/platforms/android/gradle.properties

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
2727
# Automatically convert third-party libraries to use AndroidX
2828
android.enableJetifier={{ENABLE_JETIFIER}}
2929

30-
# Version of flipper SDK to use with React Native
31-
FLIPPER_VERSION=0.182.0
32-
3330
# Use this property to specify which architecture you want to build.
3431
# You can also override it from the CLI using
3532
# ./gradlew <task> -PreactNativeArchitectures=x86_64

packages/engine-rn/templates/platforms/androidwear/gradle.properties

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
2828
android.enableJetifier={{ENABLE_JETIFIER}}
2929

3030

31-
# Version of flipper SDK to use with React Native
32-
FLIPPER_VERSION=0.182.0
33-
3431
# Use this property to specify which architecture you want to build.
3532
# You can also override it from the CLI using
3633
# ./gradlew <task> -PreactNativeArchitectures=x86_64

packages/engine-rn/templates/platforms/ios/Podfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ end
4141
target 'RNVApp' do
4242
config = use_native_modules!
4343

44-
# Flags change depending on the env values.
45-
flags = get_default_flags()
44+
4645

4746
use_react_native!(
4847
:path => config[:reactNativePath],
@@ -70,6 +69,6 @@ target 'RNVApp' do
7069
config[:reactNativePath],
7170
:mac_catalyst_enabled => false
7271
)
73-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
72+
7473
end
7574
end

packages/engine-rn/templates/platforms/ios/RNVApp/AppDelegate.mm

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1515
}
1616

1717
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18+
{
19+
return [self getBundleURL];
20+
}
21+
- (NSURL *)getBundleURL
1822
{
1923
#if DEBUG
2024
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

packages/sdk-android/templates/gradleProject/gradlew

+11-4
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8786

88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
87+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
88+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
9090

9191
# Use the maximum available, or set MAX_FD != -1 to use that value.
9292
MAX_FD=maximum
@@ -133,10 +133,14 @@ location of your Java installation."
133133
fi
134134
else
135135
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
136+
if ! command -v java >/dev/null 2>&1
137+
138+
then
139+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137140
138141
Please set the JAVA_HOME variable in your environment to match the
139142
location of your Java installation."
143+
fi
140144
fi
141145

142146
# Increase the maximum file descriptors if we can.
@@ -197,6 +201,9 @@ if "$cygwin" || "$msys" ; then
197201
done
198202
fi
199203

204+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
205+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206+
200207
# Collect all arguments for the java command;
201208
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202209
# shell script including quotes and variable substitutions, so put them in

packages/template-starter/renative.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"compileSdkVersion": 34,
8080
"buildToolsVersion": "34.0.0",
8181
"gradleBuildToolsVersion": "4.2.2",
82-
"gradleWrapperVersion": "8.0.1",
82+
"gradleWrapperVersion": "8.3",
8383
"ndkVersion": "25.1.8937393",
8484
"kotlinVersion": "1.8.0",
8585
"reactNativeEngine": "hermes",

spec/other/AppDelegate.mm

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1515
}
1616

1717
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18+
{
19+
return [self getBundleURL];
20+
}
21+
- (NSURL *)getBundleURL
1822
{
1923
#if DEBUG
2024
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

spec/other/Podfile

+5-11
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ target 'RNVApp' do
2020
config = use_native_modules!
2121
platform :ios, '{{PLUGIN_DEPLOYMENT_TARGET}}'
2222

23-
# Flags change depending on the env values.
24-
flags = get_default_flags()
23+
2524

2625
use_react_native!(
2726
:path => config[:reactNativePath],
28-
# Hermes is now enabled by default. Disable by setting this flag to false.
29-
:hermes_enabled => flags[:hermes_enabled],
30-
:fabric_enabled => flags[:fabric_enabled],
27+
3128
# An absolute path to your application root.
3229
:app_path => "#{Pod::Config.instance.installation_root}/../.."
3330
)
@@ -43,14 +40,11 @@ target 'RNVApp-tvOS' do
4340
config = use_native_modules!
4441
platform :tvos, '{{PLUGIN_DEPLOYMENT_TARGET}}'
4542

46-
# Flags change depending on the env values.
47-
flags = get_default_flags()
43+
4844

4945
use_react_native!(
5046
:path => config[:reactNativePath],
51-
# Hermes is now enabled by default. Disable by setting this flag to false.
52-
:hermes_enabled => flags[:hermes_enabled],
53-
:fabric_enabled => flags[:fabric_enabled],
47+
5448
# An absolute path to your application root.
5549
:app_path => "#{Pod::Config.instance.installation_root}/../.."
5650
)
@@ -70,5 +64,5 @@ post_install do |installer|
7064
config[:reactNativePath],
7165
:mac_catalyst_enabled => false
7266
)
73-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
67+
7468
end

spec/xml-ish/Info.plist

+5-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,11 @@
2626
<true/>
2727
<key>NSAppTransportSecurity</key>
2828
<dict>
29-
<key>NSExceptionDomains</key>
30-
<dict>
31-
<key>localhost</key>
32-
<dict>
33-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
34-
<true/>
35-
</dict>
36-
</dict>
29+
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
30+
<key>NSAllowsArbitraryLoads</key>
31+
<false/>
32+
<key>NSAllowsLocalNetworking</key>
33+
<true/>
3734
</dict>
3835
<key>NSLocationWhenInUseUsageDescription</key>
3936
<string></string>

0 commit comments

Comments
 (0)