From 9d22a7fd0e82d6c2660217c1fb3c004ab30d6844 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 6 Mar 2024 13:53:48 +0000 Subject: [PATCH 1/2] [RN][iOS] Fix flipper for Xcode 15.3 --- .../react-native/scripts/cocoapods/utils.rb | 21 ++ .../react-native/scripts/react_native_pods.rb | 1 + packages/rn-tester/Podfile.lock | 256 ++++++++++++++++-- 3 files changed, 251 insertions(+), 27 deletions(-) diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index 7a3b0823193a65..0237391a2efed7 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -86,6 +86,27 @@ def self.exclude_i386_architecture_while_using_hermes(installer) end end + def self.fix_flipper_for_xcode_15_3(installer) + installer.pods_project.targets.each do |target| + if target.name == 'Flipper' + file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h' + if !File.exist(file_path) + return + end + + contents = File.read(file_path) + if contents.include?('#include ') + return + end + mod_content = contents.gsub("#pragma once", "#pragma once\n#include ") + File.chmod(0755, file_path) + File.open(file_path, 'w') do |file| + file.puts(mod_content) + end + end + end + end + def self.set_use_hermes_build_setting(installer, hermes_enabled) Pod::UI.puts("Setting USE_HERMES build settings") projects = self.extract_projects(installer) diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index 01e68b50a47e91..be8b0cef664d54 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -308,6 +308,7 @@ def react_native_post_install( ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled) ReactNativePodsUtils.apply_xcode_15_patch(installer) ReactNativePodsUtils.updateOSDeploymentTarget(installer) + ReactNativePodsUtils.fix_flipper_for_xcode_15_3(installer) NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer) NewArchitectureHelper.modify_flags_for_new_architecture(installer, NewArchitectureHelper.new_arch_enabled) diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 699b9c46391cee..95b63e44738d2b 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -1,27 +1,110 @@ PODS: - boost (1.83.0) + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - FBLazyVector (0.73.5) - - FBReactNativeSpec (0.73.5): - - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.5) - - RCTTypeSafety (= 0.73.5) - - React-Core (= 0.73.5) - - React-jsi (= 0.73.5) - - ReactCommon/turbomodule/core (= 0.73.5) + - Flipper (0.201.0): + - Flipper-Folly (~> 2.6) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (3.2.0.1) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.10): + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) + - Flipper-Glog + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - Flipper-Glog (0.5.0.5) + - Flipper-PeerTalk (0.0.4) + - FlipperKit (0.201.0): + - FlipperKit/Core (= 0.201.0) + - FlipperKit/Core (0.201.0): + - Flipper (~> 0.201.0) + - FlipperKit/CppBridge + - FlipperKit/FBCxxFollyDynamicConvert + - FlipperKit/FBDefines + - FlipperKit/FKPortForwarding + - SocketRocket (~> 0.6.0) + - FlipperKit/CppBridge (0.201.0): + - Flipper (~> 0.201.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.201.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.201.0) + - FlipperKit/FKPortForwarding (0.201.0): + - CocoaAsyncSocket (~> 7.6) + - Flipper-PeerTalk (~> 0.0.4) + - FlipperKit/FlipperKitHighlightOverlay (0.201.0) + - FlipperKit/FlipperKitLayoutHelpers (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0) + - FlipperKit/FlipperKitNetworkPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/SKIOSNetworkPlugin (0.201.0): + - FlipperKit/Core + - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - hermes-engine (0.73.5): - - hermes-engine/Hermes (= 0.73.5) - - hermes-engine/inspector (= 0.73.5) - - hermes-engine/inspector_chrome (= 0.73.5) - - hermes-engine/Public (= 0.73.5) - - hermes-engine/Hermes (0.73.5) - - hermes-engine/inspector (0.73.5) - - hermes-engine/inspector_chrome (0.73.5) - - hermes-engine/Public (0.73.5) + - hermes-engine/Pre-built (= 0.73.5) + - hermes-engine/Pre-built (0.73.5) - libevent (2.1.12) + - MyNativeView (0.0.1): + - glog + - hermes-engine + - RCT-Folly (= 2022.05.16.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - NativeCxxModuleExample (0.0.1): + - glog + - hermes-engine + - RCT-Folly (= 2022.05.16.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - OCMock (3.9.1) + - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): - boost - DoubleConversion @@ -65,7 +148,6 @@ PODS: - React-callinvoker (0.73.5) - React-Codegen (0.73.5): - DoubleConversion - - FBReactNativeSpec - glog - hermes-engine - RCT-Folly @@ -80,7 +162,6 @@ PODS: - React-jsiexecutor - React-NativeModulesApple - React-rendererdebug - - React-rncore - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core @@ -908,6 +989,8 @@ PODS: - React-jsi (= 0.73.5) - React-perflogger (= 0.73.5) - React-jsinspector (0.73.5) + - React-jsitracing (0.73.5): + - React-jsi - React-logger (0.73.5): - glog - React-Mapbuffer (0.73.5): @@ -941,13 +1024,21 @@ PODS: - RCTTypeSafety - React-Core - React-CoreModules + - React-debug + - React-Fabric + - React-graphics - React-hermes - React-nativeconfig - React-NativeModulesApple - React-RCTFabric - React-RCTImage - React-RCTNetwork + - React-rendererdebug + - React-RuntimeApple + - React-RuntimeCore + - React-RuntimeHermes - React-runtimescheduler + - React-utils - ReactCommon - React-RCTBlob (0.73.5): - hermes-engine @@ -1038,8 +1129,42 @@ PODS: - RCT-Folly (= 2022.05.16.00) - React-debug - React-rncore (0.73.5) + - React-RuntimeApple (0.73.5): + - hermes-engine + - RCT-Folly/Fabric (= 2022.05.16.00) + - React-callinvoker + - React-Core/Default + - React-CoreModules + - React-cxxreact + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-Mapbuffer + - React-NativeModulesApple + - React-RCTFabric + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-utils + - React-RuntimeCore (0.73.5): + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2022.05.16.00) + - React-cxxreact + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-runtimeexecutor + - React-runtimescheduler - React-runtimeexecutor (0.73.5): - React-jsi (= 0.73.5) + - React-RuntimeHermes (0.73.5): + - hermes-engine + - RCT-Folly/Fabric (= 2022.05.16.00) + - React-jsi + - React-jsitracing + - React-nativeconfig + - React-utils - React-runtimescheduler (0.73.5): - glog - hermes-engine @@ -1106,8 +1231,23 @@ PODS: - React-perflogger (= 0.73.5) - ScreenshotManager (0.0.1): - glog + - hermes-engine - RCT-Folly (= 2022.05.16.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core + - React-debug + - React-Fabric + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - SocketRocket (0.6.1) - Yoga (1.14.0) @@ -1115,11 +1255,33 @@ DEPENDENCIES: - boost (from `../react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../react-native/Libraries/FBLazyVector`) - - FBReactNativeSpec (from `../react-native/React/FBReactNativeSpec`) + - Flipper (= 0.201.0) + - Flipper-Boost-iOSX (= 1.76.0.1.11) + - Flipper-DoubleConversion (= 3.2.0.1) + - Flipper-Fmt (= 7.1.7) + - Flipper-Folly (= 2.6.10) + - Flipper-Glog (= 0.5.0.5) + - Flipper-PeerTalk (= 0.0.4) + - FlipperKit (= 0.201.0) + - FlipperKit/Core (= 0.201.0) + - FlipperKit/CppBridge (= 0.201.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0) + - FlipperKit/FBDefines (= 0.201.0) + - FlipperKit/FKPortForwarding (= 0.201.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0) + - FlipperKit/FlipperKitReactPlugin (= 0.201.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.201.0) - glog (from `../react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) + - MyNativeView (from `NativeComponentExample`) + - NativeCxxModuleExample (from `NativeCxxModuleExample`) - OCMock (~> 3.9.1) + - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../react-native/Libraries/RCTRequired`) @@ -1128,6 +1290,7 @@ DEPENDENCIES: - React-callinvoker (from `../react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../react-native/`) + - React-Core/DevSupport (from `../react-native/`) - React-Core/RCTWebSocket (from `../react-native/`) - React-CoreModules (from `../react-native/React/CoreModules`) - React-cxxreact (from `../react-native/ReactCommon/cxxreact`) @@ -1141,6 +1304,7 @@ DEPENDENCIES: - React-jsi (from `../react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../react-native/ReactCommon/jsinspector-modern`) + - React-jsitracing (from `../react-native/ReactCommon/hermes/executor/`) - React-logger (from `../react-native/ReactCommon/logger`) - React-Mapbuffer (from `../react-native/ReactCommon`) - React-nativeconfig (from `../react-native/ReactCommon`) @@ -1161,7 +1325,10 @@ DEPENDENCIES: - React-RCTVibration (from `../react-native/Libraries/Vibration`) - React-rendererdebug (from `../react-native/ReactCommon/react/renderer/debug`) - React-rncore (from `../react-native/ReactCommon`) + - React-RuntimeApple (from `../react-native/ReactCommon/react/runtime/platform/ios`) + - React-RuntimeCore (from `../react-native/ReactCommon/react/runtime`) - React-runtimeexecutor (from `../react-native/ReactCommon/runtimeexecutor`) + - React-RuntimeHermes (from `../react-native/ReactCommon/react/runtime`) - React-runtimescheduler (from `../react-native/ReactCommon/react/renderer/runtimescheduler`) - React-utils (from `../react-native/ReactCommon/react/utils`) - ReactCommon-Samples (from `../react-native/ReactCommon/react/nativemodule/samples`) @@ -1171,9 +1338,19 @@ DEPENDENCIES: SPEC REPOS: trunk: + - CocoaAsyncSocket + - Flipper + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt + - Flipper-Folly + - Flipper-Glog + - Flipper-PeerTalk + - FlipperKit - fmt - libevent - OCMock + - OpenSSL-Universal - SocketRocket EXTERNAL SOURCES: @@ -1183,13 +1360,15 @@ EXTERNAL SOURCES: :podspec: "../react-native/third-party-podspecs/DoubleConversion.podspec" FBLazyVector: :path: "../react-native/Libraries/FBLazyVector" - FBReactNativeSpec: - :path: "../react-native/React/FBReactNativeSpec" glog: :podspec: "../react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: hermes-2024-02-20-RNv0.73.5-18f99ace4213052c5e7cdbcd39ee9766cd5df7e4 + MyNativeView: + :path: NativeComponentExample + NativeCxxModuleExample: + :path: NativeCxxModuleExample RCT-Folly: :podspec: "../react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -1228,6 +1407,8 @@ EXTERNAL SOURCES: :path: "../react-native/ReactCommon/jsiexecutor" React-jsinspector: :path: "../react-native/ReactCommon/jsinspector-modern" + React-jsitracing: + :path: "../react-native/ReactCommon/hermes/executor/" React-logger: :path: "../react-native/ReactCommon/logger" React-Mapbuffer: @@ -1268,8 +1449,14 @@ EXTERNAL SOURCES: :path: "../react-native/ReactCommon/react/renderer/debug" React-rncore: :path: "../react-native/ReactCommon" + React-RuntimeApple: + :path: "../react-native/ReactCommon/react/runtime/platform/ios" + React-RuntimeCore: + :path: "../react-native/ReactCommon/react/runtime" React-runtimeexecutor: :path: "../react-native/ReactCommon/runtimeexecutor" + React-RuntimeHermes: + :path: "../react-native/ReactCommon/react/runtime" React-runtimescheduler: :path: "../react-native/ReactCommon/react/renderer/runtimescheduler" React-utils: @@ -1285,20 +1472,31 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: d3f49c53809116a5d38da093a8aa78bf551aed09 + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d - FBReactNativeSpec: e08b5b0346329d0e7c12144dc3628b67fa9f7e45 + Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: e6aa51d4f51b0fdb93735b64a54059be5989be46 + hermes-engine: 1d1835b2cc54c381909d94d1b3c8e0a2f1a94a0e libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 + MyNativeView: cf4a0d88cc371ee1244b6468ebe909465c449738 + NativeCxxModuleExample: a6c5259737a07f2c744c2d1ce6d7b5e970a935ab OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 RCTRequired: 2544c0f1081a5fa12e108bb8cb40e5f4581ccd87 RCTTypeSafety: 50efabe2b115c11ed03fbf3fd79e2f163ddb5d7c React: 84221d5e0ce297bc57c4b6af539a62d812d89f10 React-callinvoker: 5d17577ecc7f784535ebedf3aad4bcbf8f4b5117 - React-Codegen: 32560fc2a284d600f203430987bbe3973eeb0597 + React-Codegen: e463fc67463ebb2790b6d42f32befbe93e869720 React-Core: 8e782e7e24c7843871a0d9c3c8d7c5b3ebb73832 React-CoreModules: 7875ee247e3e6e0e683b52cd1cdda1b71618bd55 React-cxxreact: 788cd771c6e94d44f8d472fdfae89b67226067ea @@ -1312,6 +1510,7 @@ SPEC CHECKSUMS: React-jsi: 1d59d0a148c76641ac577729e0268bafa494152c React-jsiexecutor: 262b66928ad948491d03fd328bb5b822cce94647 React-jsinspector: 32db5e364bcae8fca8cdf8891830636275add0c5 + React-jsitracing: 42912570ecc01b07e29894a1a05a54f270e683ce React-logger: 0331362115f0f5b392bd7ed14636d1a3ea612479 React-Mapbuffer: 7c35cd53a22d0be04d3f26f7881c7fb7dd230216 React-nativeconfig: 1166714a4f7ea57a0df5c2cb44fbc70f98d580f9 @@ -1319,9 +1518,9 @@ SPEC CHECKSUMS: React-perflogger: 0dd9f1725d55f8264b81efadd373fe1d9cca7dc2 React-RCTActionSheet: 05656d2102b0d0a2676d58bad4d80106af5367b2 React-RCTAnimation: 6c66beae98730fb7615df28caf651e295f2401e5 - React-RCTAppDelegate: 891b80c596fffcb3f90431739495d606a9a0d610 + React-RCTAppDelegate: 3c65d166c42de3635e40555b16fa388827acf63e React-RCTBlob: 8ecee445ec5fa9ed8a8621a136183c1045165100 - React-RCTFabric: f291e06bc63fef26cdd105537bae5c6a8d3bdca8 + React-RCTFabric: 43929bf7439754d75bd9a88f97c990bfb98c90fd React-RCTImage: 585b16465146cb839da02f3179ce7cb19d332642 React-RCTLinking: 09ba11f7df62946e7ddca1b51aa3bf47b230e008 React-RCTNetwork: e070f8d2fca60f1e9571936ce54d165e77129e76 @@ -1331,13 +1530,16 @@ SPEC CHECKSUMS: React-RCTText: f6cc5a3cf0f1a4f3d1256657dca1025e4cfe45e0 React-RCTVibration: d9948962139f9924ef87f23ab240e045e496213b React-rendererdebug: ee05480666415f7a76e6cf0a7a50363423f44809 - React-rncore: 53551274d12593e5fb43ee0670b85db715ffed7e + React-rncore: a93b592afe8ff28029a3c4009e52da14a0516c90 + React-RuntimeApple: 95172dcfb260834a2bf1c8302b27ef0bc276e079 + React-RuntimeCore: 404f636cf4144ead99c1bf46fad1cbecede27876 React-runtimeexecutor: 56f562a608056fb0c1711d900a992e26f375d817 + React-RuntimeHermes: 4a505ba2d60c4c8523d28f1d69dd5d115d81a6d3 React-runtimescheduler: 814b644a5f456c7df1fba7bcd9914707152527c6 React-utils: 987a4526a2fc0acdfaf87888adfe0bf9d0452066 ReactCommon: 2947b0bffd82ea0e58ca7928881152d4c6dae9af ReactCommon-Samples: c2c2cc5c1202678af0ee47d6277f048d37b7a568 - ScreenshotManager: f8f98066ee9be24a6e63e3417da912941fb7b0dc + ScreenshotManager: 9f57ba67777a675be2990e8d1c01d4b6d1098acc SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: a716eea57d0d3430219c0a5a233e1e93ee931eb7 From 228c2b0468c15aa85cdbc0a42e828743cbc1fb95 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 6 Mar 2024 19:16:41 +0000 Subject: [PATCH 2/2] Fix ruby typo --- packages/react-native/scripts/cocoapods/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index 0237391a2efed7..b44cc6e637f34c 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -90,7 +90,7 @@ def self.fix_flipper_for_xcode_15_3(installer) installer.pods_project.targets.each do |target| if target.name == 'Flipper' file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h' - if !File.exist(file_path) + if !File.exist?(file_path) return end