From 387fb2ee8cbfaeebee77ab2f9c283a4f55c8cf4d Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Sun, 21 Jul 2024 21:15:25 -0700 Subject: [PATCH] chore(react-native): update code for react-native 0.71.x upgrade --- packages/react-native/ios/Podfile | 42 +- packages/react-native/ios/Podfile.lock | 526 ++++++++---------- .../ios/reactnative/AppDelegate.h | 12 +- .../ios/reactnative/AppDelegate.mm | 131 +---- .../react-native/ios/reactnative/Info.plist | 4 +- 5 files changed, 297 insertions(+), 418 deletions(-) diff --git a/packages/react-native/ios/Podfile b/packages/react-native/ios/Podfile index 3450ab6..933fda7 100644 --- a/packages/react-native/ios/Podfile +++ b/packages/react-native/ios/Podfile @@ -1,8 +1,24 @@ require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' -platform :ios, '12.4' -install! 'cocoapods', :deterministic_uuids => false +platform :ios, min_ios_version_supported + +# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. +# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded +# +# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` +# ```js +# module.exports = { +# dependencies: { +# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), +# ``` +flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled + +linkage = ENV['USE_FRAMEWORKS'] +if linkage != nil + Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green + use_frameworks! :linkage => linkage.to_sym +end target 'reactnative' do config = use_native_modules! @@ -12,9 +28,16 @@ target 'reactnative' do use_react_native!( :path => config[:reactNativePath], - # to enable hermes on iOS, change `false` to `true` and then install pods + # Hermes is now enabled by default. Disable by setting this flag to false. + # Upcoming versions of React Native may rely on get_default_flags(), but + # we make it explicit here to aid in the React Native upgrade process. :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], + # Enables Flipper. + # + # Note that if you have use_frameworks! enabled, Flipper will not work and + # you should disable the next line. + :flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) @@ -24,14 +47,13 @@ target 'reactnative' do # Pods for testing end - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable the next line. - use_flipper!() - post_install do |installer| - react_native_post_install(installer) + react_native_post_install( + installer, + # Set `mac_catalyst_enabled` to `true` in order to apply patches + # necessary for Mac Catalyst builds + :mac_catalyst_enabled => false + ) __apply_Xcode_12_5_M1_post_install_workaround(installer) end end diff --git a/packages/react-native/ios/Podfile.lock b/packages/react-native/ios/Podfile.lock index 6e0cf6b..86578c5 100644 --- a/packages/react-native/ios/Podfile.lock +++ b/packages/react-native/ios/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.71.19) - - FBReactNativeSpec (0.71.19): + - FBLazyVector (0.70.15) + - FBReactNativeSpec (0.70.15): - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.71.19) - - RCTTypeSafety (= 0.71.19) - - React-Core (= 0.71.19) - - React-jsi (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) + - RCTRequired (= 0.70.15) + - RCTTypeSafety (= 0.70.15) + - React-Core (= 0.70.15) + - React-jsi (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) - Flipper (0.125.0): - Flipper-Folly (~> 2.6) - Flipper-RSocket (~> 1.4) @@ -73,9 +73,7 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.71.19): - - hermes-engine/Pre-built (= 0.71.19) - - hermes-engine/Pre-built (0.71.19) + - hermes-engine (0.70.15) - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) - RCT-Folly (2021.07.22.00): @@ -95,326 +93,283 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.71.19) - - RCTTypeSafety (0.71.19): - - FBLazyVector (= 0.71.19) - - RCTRequired (= 0.71.19) - - React-Core (= 0.71.19) - - React (0.71.19): - - React-Core (= 0.71.19) - - React-Core/DevSupport (= 0.71.19) - - React-Core/RCTWebSocket (= 0.71.19) - - React-RCTActionSheet (= 0.71.19) - - React-RCTAnimation (= 0.71.19) - - React-RCTBlob (= 0.71.19) - - React-RCTImage (= 0.71.19) - - React-RCTLinking (= 0.71.19) - - React-RCTNetwork (= 0.71.19) - - React-RCTSettings (= 0.71.19) - - React-RCTText (= 0.71.19) - - React-RCTVibration (= 0.71.19) - - React-callinvoker (0.71.19) - - React-Codegen (0.71.19): - - FBReactNativeSpec - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-jsi - - React-jsiexecutor - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-Core (0.71.19): + - RCTRequired (0.70.15) + - RCTTypeSafety (0.70.15): + - FBLazyVector (= 0.70.15) + - RCTRequired (= 0.70.15) + - React-Core (= 0.70.15) + - React (0.70.15): + - React-Core (= 0.70.15) + - React-Core/DevSupport (= 0.70.15) + - React-Core/RCTWebSocket (= 0.70.15) + - React-RCTActionSheet (= 0.70.15) + - React-RCTAnimation (= 0.70.15) + - React-RCTBlob (= 0.70.15) + - React-RCTImage (= 0.70.15) + - React-RCTLinking (= 0.70.15) + - React-RCTNetwork (= 0.70.15) + - React-RCTSettings (= 0.70.15) + - React-RCTText (= 0.70.15) + - React-RCTVibration (= 0.70.15) + - React-bridging (0.70.15): + - RCT-Folly (= 2021.07.22.00) + - React-jsi (= 0.70.15) + - React-callinvoker (0.70.15) + - React-Codegen (0.70.15): + - FBReactNativeSpec (= 0.70.15) + - RCT-Folly (= 2021.07.22.00) + - RCTRequired (= 0.70.15) + - RCTTypeSafety (= 0.70.15) + - React-Core (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-Core (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.19) - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-Core/Default (= 0.70.15) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/CoreModulesHeaders (0.71.19): + - React-Core/CoreModulesHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/Default (0.71.19): + - React-Core/Default (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/DevSupport (0.71.19): + - React-Core/DevSupport (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.19) - - React-Core/RCTWebSocket (= 0.71.19) - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-jsinspector (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-Core/Default (= 0.70.15) + - React-Core/RCTWebSocket (= 0.70.15) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-jsinspector (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTActionSheetHeaders (0.71.19): + - React-Core/RCTActionSheetHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTAnimationHeaders (0.71.19): + - React-Core/RCTAnimationHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTBlobHeaders (0.71.19): + - React-Core/RCTBlobHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTImageHeaders (0.71.19): + - React-Core/RCTImageHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTLinkingHeaders (0.71.19): + - React-Core/RCTLinkingHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTNetworkHeaders (0.71.19): + - React-Core/RCTNetworkHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTSettingsHeaders (0.71.19): + - React-Core/RCTSettingsHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTTextHeaders (0.71.19): + - React-Core/RCTTextHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTVibrationHeaders (0.71.19): + - React-Core/RCTVibrationHeaders (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-Core/RCTWebSocket (0.71.19): + - React-Core/RCTWebSocket (0.70.15): - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.19) - - React-cxxreact (= 0.71.19) - - React-hermes - - React-jsi (= 0.71.19) - - React-jsiexecutor (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-Core/Default (= 0.70.15) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-perflogger (= 0.70.15) - Yoga - - React-CoreModules (0.71.19): + - React-CoreModules (0.70.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.19) - - React-Codegen (= 0.71.19) - - React-Core/CoreModulesHeaders (= 0.71.19) - - React-jsi (= 0.71.19) - - React-RCTBlob - - React-RCTImage (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-cxxreact (0.71.19): + - RCTTypeSafety (= 0.70.15) + - React-Codegen (= 0.70.15) + - React-Core/CoreModulesHeaders (= 0.70.15) + - React-jsi (= 0.70.15) + - React-RCTImage (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-cxxreact (0.70.15): - boost (= 1.76.0) - DoubleConversion - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.19) - - React-jsi (= 0.71.19) - - React-jsinspector (= 0.71.19) - - React-logger (= 0.71.19) - - React-perflogger (= 0.71.19) - - React-runtimeexecutor (= 0.71.19) - - React-hermes (0.71.19): + - React-callinvoker (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsinspector (= 0.70.15) + - React-logger (= 0.70.15) + - React-perflogger (= 0.70.15) + - React-runtimeexecutor (= 0.70.15) + - React-hermes (0.70.15): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 0.71.19) - - React-jsi - - React-jsiexecutor (= 0.71.19) - - React-jsinspector (= 0.71.19) - - React-perflogger (= 0.71.19) - - React-jsi (0.71.19): + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-jsiexecutor (= 0.70.15) + - React-jsinspector (= 0.70.15) + - React-perflogger (= 0.70.15) + - React-jsi (0.70.15): - boost (= 1.76.0) - DoubleConversion - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.71.19): + - React-jsi/Default (= 0.70.15) + - React-jsi/Default (0.70.15): + - boost (= 1.76.0) - DoubleConversion - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.19) - - React-jsi (= 0.71.19) - - React-perflogger (= 0.71.19) - - React-jsinspector (0.71.19) - - React-logger (0.71.19): + - React-jsiexecutor (0.70.15): + - DoubleConversion - glog - - react-native-get-random-values (1.11.0): - - React-Core - - React-perflogger (0.71.19) - - React-RCTActionSheet (0.71.19): - - React-Core/RCTActionSheetHeaders (= 0.71.19) - - React-RCTAnimation (0.71.19): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.19) - - React-Codegen (= 0.71.19) - - React-Core/RCTAnimationHeaders (= 0.71.19) - - React-jsi (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-RCTAppDelegate (0.71.19): - - RCT-Folly - - RCTRequired - - RCTTypeSafety + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-perflogger (= 0.70.15) + - React-jsinspector (0.70.15) + - React-logger (0.70.15): + - glog + - react-native-get-random-values (1.11.0): - React-Core - - ReactCommon/turbomodule/core - - React-RCTBlob (0.71.19): - - hermes-engine + - React-perflogger (0.70.15) + - React-RCTActionSheet (0.70.15): + - React-Core/RCTActionSheetHeaders (= 0.70.15) + - React-RCTAnimation (0.70.15): - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.19) - - React-Core/RCTBlobHeaders (= 0.71.19) - - React-Core/RCTWebSocket (= 0.71.19) - - React-jsi (= 0.71.19) - - React-RCTNetwork (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-RCTImage (0.71.19): + - RCTTypeSafety (= 0.70.15) + - React-Codegen (= 0.70.15) + - React-Core/RCTAnimationHeaders (= 0.70.15) + - React-jsi (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-RCTBlob (0.70.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.19) - - React-Codegen (= 0.71.19) - - React-Core/RCTImageHeaders (= 0.71.19) - - React-jsi (= 0.71.19) - - React-RCTNetwork (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-RCTLinking (0.71.19): - - React-Codegen (= 0.71.19) - - React-Core/RCTLinkingHeaders (= 0.71.19) - - React-jsi (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-RCTNetwork (0.71.19): + - React-Codegen (= 0.70.15) + - React-Core/RCTBlobHeaders (= 0.70.15) + - React-Core/RCTWebSocket (= 0.70.15) + - React-jsi (= 0.70.15) + - React-RCTNetwork (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-RCTImage (0.70.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.19) - - React-Codegen (= 0.71.19) - - React-Core/RCTNetworkHeaders (= 0.71.19) - - React-jsi (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-RCTSettings (0.71.19): + - RCTTypeSafety (= 0.70.15) + - React-Codegen (= 0.70.15) + - React-Core/RCTImageHeaders (= 0.70.15) + - React-jsi (= 0.70.15) + - React-RCTNetwork (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-RCTLinking (0.70.15): + - React-Codegen (= 0.70.15) + - React-Core/RCTLinkingHeaders (= 0.70.15) + - React-jsi (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-RCTNetwork (0.70.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.19) - - React-Codegen (= 0.71.19) - - React-Core/RCTSettingsHeaders (= 0.71.19) - - React-jsi (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-RCTText (0.71.19): - - React-Core/RCTTextHeaders (= 0.71.19) - - React-RCTVibration (0.71.19): + - RCTTypeSafety (= 0.70.15) + - React-Codegen (= 0.70.15) + - React-Core/RCTNetworkHeaders (= 0.70.15) + - React-jsi (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-RCTSettings (0.70.15): - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.19) - - React-Core/RCTVibrationHeaders (= 0.71.19) - - React-jsi (= 0.71.19) - - ReactCommon/turbomodule/core (= 0.71.19) - - React-runtimeexecutor (0.71.19): - - React-jsi (= 0.71.19) - - ReactCommon/turbomodule/bridging (0.71.19): - - DoubleConversion - - glog - - hermes-engine + - RCTTypeSafety (= 0.70.15) + - React-Codegen (= 0.70.15) + - React-Core/RCTSettingsHeaders (= 0.70.15) + - React-jsi (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-RCTText (0.70.15): + - React-Core/RCTTextHeaders (= 0.70.15) + - React-RCTVibration (0.70.15): - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.19) - - React-Core (= 0.71.19) - - React-cxxreact (= 0.71.19) - - React-jsi (= 0.71.19) - - React-logger (= 0.71.19) - - React-perflogger (= 0.71.19) - - ReactCommon/turbomodule/core (0.71.19): + - React-Codegen (= 0.70.15) + - React-Core/RCTVibrationHeaders (= 0.70.15) + - React-jsi (= 0.70.15) + - ReactCommon/turbomodule/core (= 0.70.15) + - React-runtimeexecutor (0.70.15): + - React-jsi (= 0.70.15) + - ReactCommon/turbomodule/core (0.70.15): - DoubleConversion - glog - - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.19) - - React-Core (= 0.71.19) - - React-cxxreact (= 0.71.19) - - React-jsi (= 0.71.19) - - React-logger (= 0.71.19) - - React-perflogger (= 0.71.19) + - React-bridging (= 0.70.15) + - React-callinvoker (= 0.70.15) + - React-Core (= 0.70.15) + - React-cxxreact (= 0.70.15) + - React-jsi (= 0.70.15) + - React-logger (= 0.70.15) + - React-perflogger (= 0.70.15) - SocketRocket (0.6.0) - Yoga (1.14.0) - YogaKit (1.18.1): @@ -447,16 +402,18 @@ DEPENDENCIES: - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) + - hermes-engine (from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`) - libevent (~> 2.1.12) - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - React (from `../node_modules/react-native/`) + - React-bridging (from `../node_modules/react-native/ReactCommon`) - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../node_modules/react-native/`) + - React-Core/DevSupport (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) @@ -469,7 +426,6 @@ DEPENDENCIES: - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) @@ -511,7 +467,7 @@ EXTERNAL SOURCES: glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: - :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :podspec: "../node_modules/react-native/sdks/hermes/hermes-engine.podspec" RCT-Folly: :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -520,6 +476,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/TypeSafety" React: :path: "../node_modules/react-native/" + React-bridging: + :path: "../node_modules/react-native/ReactCommon" React-callinvoker: :path: "../node_modules/react-native/ReactCommon/callinvoker" React-Codegen: @@ -548,8 +506,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/ActionSheetIOS" React-RCTAnimation: :path: "../node_modules/react-native/Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../node_modules/react-native/Libraries/AppDelegate" React-RCTBlob: :path: "../node_modules/react-native/Libraries/Blob" React-RCTImage: @@ -575,8 +531,8 @@ SPEC CHECKSUMS: boost: 7dcd2de282d72e344012f7d6564d024930a6a440 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: 038aa5ab388c9eec7a6a65b71596afd9ff99c949 - FBReactNativeSpec: 25c3e937fdcfe4d7c898449051e1f30b93cc99ce + FBLazyVector: 9cf707e46f9bd90816b7c91b2c1c8b8a2f549527 + FBReactNativeSpec: 5ce1ea97a4309ded19af6c21f13f63ee3cabfed2 Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -588,41 +544,41 @@ SPEC CHECKSUMS: FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - hermes-engine: 1468b458e81705fcd55ed6e29c32ff069f04b69c + hermes-engine: 2592781da1571e4375dfd897f9462638c2d0ceb9 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: 79b5f823c2b4b865451ba9ddb33c676786760ea8 - RCTTypeSafety: 4f6d5414413d8848923ccd448c4cef4b6ffcd403 - React: d277ab7d840987a460690fcbe979e9234785ad63 - React-callinvoker: 2d15c3bc682ef720a9a23428606aab643df74622 - React-Codegen: f00947eb19953c13e78c38d73233706e4d6f9bcb - React-Core: b3d9f6a3a406fb3a6ee84f98df0a3e45df3aed99 - React-CoreModules: a70aed68d7cf8bb94f368cbfc8da02d9586e6a65 - React-cxxreact: 12d097fb82c333c4a193cd2cd2111b0295257453 - React-hermes: fa22fb2131e784d87105343833d88c1dc6971676 - React-jsi: a7a06cf56e5af973a35972aa57443629d5621aed - React-jsiexecutor: 7263801e44e004967685dd40672bfcedcda00834 - React-jsinspector: e591d9ecb571456fc929ee10409d8847a442d6a7 - React-logger: 70ddbe0e07179c8adb94c4bffc36c6abc952d3d4 + RCTRequired: 2a96ea90ffddd10cc43115bd93803692e09b5d9a + RCTTypeSafety: 02c99baddcf0b3393bf58e6d9b792e83a37716b4 + React: 45e3210df90d25ec6da7fc286943b377b63a92ec + React-bridging: e3a18265bbd59003562e29429985e0923a5b6286 + React-callinvoker: 344ff205a470c3c99b4daf0a2dff9bc29045d6c5 + React-Codegen: 2b1765b0e1a38b8b3601178ca27c1e9216e81632 + React-Core: 93efb81ef85fafee7f83f7ef6ecf546b2e1ee2c0 + React-CoreModules: 4eb535b1650b718cb3680767c1b9a1cacf649cbc + React-cxxreact: 283248db3101de28d6cf0fe438a2dc95537ee472 + React-hermes: 5439b771de0b04930c97888cc4c28852aa37389c + React-jsi: 560bdf0bc36d5c137ac962c0eb4b60b50c304d77 + React-jsiexecutor: d2eebcd5a432f90be3baa5d1309f47d05478ea61 + React-jsinspector: bfedded1f4f562d29c2d4a8bb795c9a150a739e4 + React-logger: 31f198387a04172be49fe38e41a082560a81aeeb react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06 - React-perflogger: 0ba097528e325435aca94b32b5330f58f6acb6fb - React-RCTActionSheet: 805b3a83f3dd7ae5a1213ea9df0ed748eeb74b85 - React-RCTAnimation: 2a0233681dee47e468302b8233652b35b68329cb - React-RCTAppDelegate: 3171d94d0ce2ed7fcf982689cd6bbaf4a8721ce8 - React-RCTBlob: 8c6962fcab4a5a3d0078a3a4a98bb914a7703abf - React-RCTImage: 015ce2b9d2ad78c24deee5c807d88574225974f3 - React-RCTLinking: 6dd57d2d99ecdf6ee016c5a742ed9b68cdc8680a - React-RCTNetwork: f14e9681496cd394196c2417966769d10b45e674 - React-RCTSettings: ce9d4d7dda6ad00acb1460a1a3a286d7e4e950bd - React-RCTText: 4cbca7004176dd0ed495afa60a3978acf040059d - React-RCTVibration: 5b2bfab941e938ee5060acefdd7598077b394975 - React-runtimeexecutor: b9be1f58ce9a8b849cb8a37dd998f04ca97e3619 - ReactCommon: bb3d7051c9b8c58ee34f9af76f883bd0fd7c9c31 + React-perflogger: 010e98d3335e5185a8f7496babca50d82a042e84 + React-RCTActionSheet: 0f585d684b540a5bbfc62b0a1fbc5292cff2aefc + React-RCTAnimation: eb0e5b020333f9cc652d85f27a47086fbf56fffd + React-RCTBlob: 4af18ad2a64515c3ede9b829e8532f1508e00894 + React-RCTImage: 08787efa5378ad0e7344943eed1b898619cf956a + React-RCTLinking: ea7ec6fbfdb04df7895c39f15f0e7479acc43bca + React-RCTNetwork: 926b436b6afada9905d969a8e3713cf204905a00 + React-RCTSettings: cc083c9b6e126b7e6ea1128e64837d8b78ceb219 + React-RCTText: c36ddf2bda5131b325e1c2763700f0a63a963e1d + React-RCTVibration: 12a2a859fa22368d2fc3ca7594504fd130b91a18 + React-runtimeexecutor: 04332dda2f2335ea4ddaf9255de069d3269f4e8b + ReactCommon: 200471e0841cf2f7cde1fa2ef3d3c199ed970c07 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: d4f5b037672e6b68ba484c7cf7fe6790122df792 + Yoga: d6134eb3d6e3675afc1d6d65ccb3169b60e21980 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 983250a4189ca0ca42ae5295cef926831349ff1f +PODFILE CHECKSUM: 806287ccc419a573c4f3f2e026854122b234206c COCOAPODS: 1.15.2 diff --git a/packages/react-native/ios/reactnative/AppDelegate.h b/packages/react-native/ios/reactnative/AppDelegate.h index ef1de86..555395d 100644 --- a/packages/react-native/ios/reactnative/AppDelegate.h +++ b/packages/react-native/ios/reactnative/AppDelegate.h @@ -1,8 +1,6 @@ -#import +#import #import - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end + +@interface AppDelegate : RCTAppDelegate + +@end \ No newline at end of file diff --git a/packages/react-native/ios/reactnative/AppDelegate.mm b/packages/react-native/ios/reactnative/AppDelegate.mm index 1ea1d36..1a10565 100644 --- a/packages/react-native/ios/reactnative/AppDelegate.mm +++ b/packages/react-native/ios/reactnative/AppDelegate.mm @@ -1,87 +1,19 @@ #import "AppDelegate.h" - -#import + #import -#import - -#import - -#if RCT_NEW_ARCH_ENABLED -#import -#import -#import -#import -#import -#import - -#import - -static NSString *const kRNConcurrentRoot = @"concurrentRoot"; - -@interface AppDelegate () { - RCTTurboModuleManager *_turboModuleManager; - RCTSurfacePresenterBridgeAdapter *_bridgeAdapter; - std::shared_ptr _reactNativeConfig; - facebook::react::ContextContainer::Shared _contextContainer; -} -@end -#endif - + @implementation AppDelegate - + - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - RCTAppSetupPrepareApp(application); - - RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; - -#if RCT_NEW_ARCH_ENABLED - _contextContainer = std::make_shared(); - _reactNativeConfig = std::make_shared(); - _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); - _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer]; - bridge.surfacePresenter = _bridgeAdapter.surfacePresenter; -#endif - - NSDictionary *initProps = [self prepareInitialProps]; - UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"reactnative", initProps); - - if (@available(iOS 13.0, *)) { - rootView.backgroundColor = [UIColor systemBackgroundColor]; - } else { - rootView.backgroundColor = [UIColor whiteColor]; - } - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. -/// -/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html -/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). -/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`. -- (BOOL)concurrentRootEnabled -{ - // Switch this bool to turn on and off the concurrent root - return true; -} - -- (NSDictionary *)prepareInitialProps -{ - NSMutableDictionary *initProps = [NSMutableDictionary new]; - -#ifdef RCT_NEW_ARCH_ENABLED - initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]); -#endif - - return initProps; + self.moduleName = @"reactnative"; + // You can add your custom initial props in the dictionary below. + // They will be passed down to the ViewController used by React Native. + self.initialProps = @{}; + + return [super application:application didFinishLaunchingWithOptions:launchOptions]; } - + - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { #if DEBUG @@ -91,43 +23,14 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge #endif } -#if RCT_NEW_ARCH_ENABLED - -#pragma mark - RCTCxxBridgeDelegate - -- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge -{ - _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge - delegate:self - jsInvoker:bridge.jsCallInvoker]; - return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager); -} - -#pragma mark RCTTurboModuleManagerDelegate - -- (Class)getModuleClassFromName:(const char *)name -{ - return RCTCoreModulesClassProvider(name); -} - -- (std::shared_ptr)getTurboModule:(const std::string &)name - jsInvoker:(std::shared_ptr)jsInvoker -{ - return nullptr; -} - -- (std::shared_ptr)getTurboModule:(const std::string &)name - initParams: - (const facebook::react::ObjCTurboModule::InitParams &)params -{ - return nullptr; -} - -- (id)getModuleInstanceFromClass:(Class)moduleClass +/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. +/// +/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html +/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). +/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. +- (BOOL)concurrentRootEnabled { - return RCTAppSetupDefaultModuleFromClass(moduleClass); + return true; } -#endif - @end diff --git a/packages/react-native/ios/reactnative/Info.plist b/packages/react-native/ios/reactnative/Info.plist index 3ee5d89..8c6f94f 100644 --- a/packages/react-native/ios/reactnative/Info.plist +++ b/packages/react-native/ios/reactnative/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS NSAppTransportSecurity