Skip to content

Commit f822546

Browse files
author
Christoph Pader
committed
Merge branch '@chrispader/upgrade-react-native-to-0.73' into @chrispader/add-disable-smoothing-prop
2 parents d9461e5 + 85f9916 commit f822546

File tree

15 files changed

+4092
-4885
lines changed

15 files changed

+4092
-4885
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ example/vendor/bundle/
4848
# Temporary files created by Metro to check the health of the file watcher
4949
example/.metro-health-check*
5050

51+
# testing
52+
example/coverage
53+
5154
# node.js
5255
#
5356
node_modules/

example/Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby '>= 2.6.10'
55

6-
gem 'cocoapods', '>= 1.11.3'
6+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7+
# bound in the template on Cocoapods with next React Native release.
8+
gem 'cocoapods', '>= 1.13', '< 1.15'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

example/app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"name": "GraphExample",
3-
"displayName": "Graph Example"
2+
"name": "GraphExample"
43
}

example/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const path = require('path')
22
const pak = require('../package.json')
33

44
module.exports = {
5-
presets: ['module:metro-react-native-babel-preset'],
5+
presets: ['module:@react-native/babel-preset'],
66
plugins: [
77
[
88
'module-resolver',

example/ios/GraphExample.xcodeproj/project.pbxproj

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,11 @@
428428
);
429429
inputPaths = (
430430
"${PODS_ROOT}/Target Support Files/Pods-GraphExample/Pods-GraphExample-resources.sh",
431-
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
431+
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
432432
);
433433
name = "[CP] Copy Pods Resources";
434434
outputPaths = (
435-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
435+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
436436
);
437437
runOnlyForDeploymentPostprocessing = 0;
438438
shellPath = /bin/sh;
@@ -470,11 +470,11 @@
470470
);
471471
inputPaths = (
472472
"${PODS_ROOT}/Target Support Files/Pods-GraphExample-GraphExampleTests/Pods-GraphExample-GraphExampleTests-resources.sh",
473-
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
473+
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
474474
);
475475
name = "[CP] Copy Pods Resources";
476476
outputPaths = (
477-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
477+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
478478
);
479479
runOnlyForDeploymentPostprocessing = 0;
480480
shellPath = /bin/sh;
@@ -647,6 +647,7 @@
647647
DEVELOPMENT_TEAM = CJW62Q77E7;
648648
ENABLE_BITCODE = NO;
649649
INFOPLIST_FILE = GraphExample/Info.plist;
650+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
650651
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
651652
OTHER_LDFLAGS = (
652653
"$(inherited)",
@@ -670,6 +671,7 @@
670671
CURRENT_PROJECT_VERSION = 1;
671672
DEVELOPMENT_TEAM = CJW62Q77E7;
672673
INFOPLIST_FILE = GraphExample/Info.plist;
674+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
673675
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
674676
OTHER_LDFLAGS = (
675677
"$(inherited)",
@@ -794,7 +796,7 @@
794796
buildSettings = {
795797
ALWAYS_SEARCH_USER_PATHS = NO;
796798
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
797-
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
799+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
798800
CLANG_CXX_LIBRARY = "libc++";
799801
CLANG_ENABLE_MODULES = YES;
800802
CLANG_ENABLE_OBJC_ARC = YES;
@@ -846,8 +848,15 @@
846848
);
847849
MTL_ENABLE_DEBUG_INFO = YES;
848850
ONLY_ACTIVE_ARCH = YES;
851+
OTHER_CFLAGS = "$(inherited)";
852+
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
853+
OTHER_LDFLAGS = (
854+
"$(inherited)",
855+
" ",
856+
);
849857
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
850858
SDKROOT = iphoneos;
859+
USE_HERMES = true;
851860
};
852861
name = Debug;
853862
};
@@ -856,7 +865,7 @@
856865
buildSettings = {
857866
ALWAYS_SEARCH_USER_PATHS = NO;
858867
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
859-
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
868+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
860869
CLANG_CXX_LIBRARY = "libc++";
861870
CLANG_ENABLE_MODULES = YES;
862871
CLANG_ENABLE_OBJC_ARC = YES;
@@ -900,8 +909,15 @@
900909
"\"$(inherited)\"",
901910
);
902911
MTL_ENABLE_DEBUG_INFO = NO;
912+
OTHER_CFLAGS = "$(inherited)";
913+
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
914+
OTHER_LDFLAGS = (
915+
"$(inherited)",
916+
" ",
917+
);
903918
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
904919
SDKROOT = iphoneos;
920+
USE_HERMES = true;
905921
VALIDATE_PRODUCT = YES;
906922
};
907923
name = Release;

example/ios/GraphExample/AppDelegate.mm

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1515
}
1616

1717
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18+
{
19+
return [self getBundleURL];
20+
}
21+
22+
- (NSURL *)getBundleURL
1823
{
1924
#if DEBUG
2025
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
@@ -23,14 +28,4 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
2328
#endif
2429
}
2530

26-
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
27-
///
28-
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
29-
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
30-
/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
31-
- (BOOL)concurrentRootEnabled
32-
{
33-
return true;
34-
}
35-
3631
@end

example/ios/GraphExample/Info.plist

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@
2828
<dict>
2929
<key>NSAllowsArbitraryLoads</key>
3030
<true />
31-
<key>NSExceptionDomains</key>
32-
<dict>
33-
<key>localhost</key>
34-
<dict>
35-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
36-
<true />
37-
</dict>
38-
</dict>
31+
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
32+
<key>NSAllowsArbitraryLoads</key>
33+
<false />
34+
<key>NSAllowsLocalNetworking</key>
35+
<true />
3936
</dict>
4037
<key>NSLocationWhenInUseUsageDescription</key>
4138
<string></string>

example/ios/Podfile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
require_relative '../node_modules/react-native/scripts/react_native_pods'
2-
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
1+
# Resolve react_native_pods.rb with node to allow for hoisting
2+
require Pod::Executable.execute_command('node', ['-p',
3+
'require.resolve(
4+
"react-native/scripts/react_native_pods.rb",
5+
{paths: [process.argv[1]]},
6+
)', __dir__]).strip
37

48
platform :ios, min_ios_version_supported
59
prepare_react_native_project!
@@ -24,16 +28,8 @@ end
2428
target 'GraphExample' do
2529
config = use_native_modules!
2630

27-
# Flags change depending on the env values.
28-
flags = get_default_flags()
29-
3031
use_react_native!(
3132
:path => config[:reactNativePath],
32-
# Hermes is now enabled by default. Disable by setting this flag to false.
33-
# Upcoming versions of React Native may rely on get_default_flags(), but
34-
# we make it explicit here to aid in the React Native upgrade process.
35-
:hermes_enabled => flags[:hermes_enabled],
36-
:fabric_enabled => flags[:fabric_enabled],
3733
# Enables Flipper.
3834
#
3935
# Note that if you have use_frameworks! enabled, Flipper will not work and
@@ -49,12 +45,17 @@ target 'GraphExample' do
4945
end
5046

5147
post_install do |installer|
48+
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
5249
react_native_post_install(
5350
installer,
54-
# Set `mac_catalyst_enabled` to `true` in order to apply patches
55-
# necessary for Mac Catalyst builds
51+
config[:reactNativePath],
5652
:mac_catalyst_enabled => false
5753
)
58-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
54+
55+
installer.pods_project.targets.each do |target|
56+
target.build_configurations.each do |config|
57+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
58+
end
59+
end
5960
end
6061
end

0 commit comments

Comments
 (0)