Skip to content

Commit

Permalink
update RN dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius456 committed Jan 21, 2024
1 parent 28ce5b2 commit b0616ed
Show file tree
Hide file tree
Showing 20 changed files with 54 additions and 65 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
2 changes: 1 addition & 1 deletion packages/engine-rn-macos/src/adapters/babelAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {

return {
retainLines: true,
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
...cnf,
plugins: [
[
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-rn-tvos/src/adapters/babelAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {

return {
retainLines: true,
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
...cnf,
plugins: [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier={{ENABLE_JETIFIER}}

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier={{ENABLE_JETIFIER}}

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
8 changes: 3 additions & 5 deletions packages/engine-rn-tvos/templates/platforms/tvos/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ target 'RNVApp' do
config = use_native_modules!
platform :ios, '{{PLUGIN_DEPLOYMENT_TARGET}}'

# Flags change depending on the env values.
flags = get_default_flags()


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

# Flags change depending on the env values.
flags = get_default_flags()


use_react_native!(
:path => config[:reactNativePath],
Expand All @@ -70,5 +68,5 @@ post_install do |installer|
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)

end
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self getBundleURL];
}
- (NSURL *)getBundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-rn-windows/src/adapters/babelAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {

return {
retainLines: true,
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
...cnf,
plugins: [
[
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-rn/src/adapters/babelAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const withRNVBabel = (cnf: BabelConfig): BabelConfig => {

return {
retainLines: true,
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
...cnf,
plugins: [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier={{ENABLE_JETIFIER}}

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ android.useAndroidX={{ENABLE_ANDROID_X}}
android.enableJetifier={{ENABLE_JETIFIER}}


# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
5 changes: 2 additions & 3 deletions packages/engine-rn/templates/platforms/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ end
target 'RNVApp' do
config = use_native_modules!

# Flags change depending on the env values.
flags = get_default_flags()


use_react_native!(
:path => config[:reactNativePath],
Expand Down Expand Up @@ -70,6 +69,6 @@ target 'RNVApp' do
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)

end
end
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self getBundleURL];
}
- (NSURL *)getBundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
Expand Down
15 changes: 11 additions & 4 deletions packages/sdk-android/templates/gradleProject/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

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


# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,10 +133,14 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1

then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +201,9 @@ if "$cygwin" || "$msys" ; then
done
fi

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
2 changes: 1 addition & 1 deletion packages/template-starter/renative.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"compileSdkVersion": 34,
"buildToolsVersion": "34.0.0",
"gradleBuildToolsVersion": "4.2.2",
"gradleWrapperVersion": "8.0.1",
"gradleWrapperVersion": "8.3",
"ndkVersion": "25.1.8937393",
"kotlinVersion": "1.8.0",
"reactNativeEngine": "hermes",
Expand Down
4 changes: 4 additions & 0 deletions spec/other/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self getBundleURL];
}
- (NSURL *)getBundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
Expand Down
16 changes: 5 additions & 11 deletions spec/other/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ target 'RNVApp' do
config = use_native_modules!
platform :ios, '{{PLUGIN_DEPLOYMENT_TARGET}}'

# Flags change depending on the env values.
flags = get_default_flags()


use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],

# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/../.."
)
Expand All @@ -43,14 +40,11 @@ target 'RNVApp-tvOS' do
config = use_native_modules!
platform :tvos, '{{PLUGIN_DEPLOYMENT_TARGET}}'

# Flags change depending on the env values.
flags = get_default_flags()


use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],

# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/../.."
)
Expand All @@ -70,5 +64,5 @@ post_install do |installer|
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)

end
13 changes: 5 additions & 8 deletions spec/xml-ish/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
Expand Down

0 comments on commit b0616ed

Please sign in to comment.