From 07b73482a66ac138a7b680b4da837dd7cb882b0b Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Fri, 3 Nov 2023 11:41:49 +0100 Subject: [PATCH] Fix fabric build --- FabricTestExample/ios/Podfile.lock | 40 +++++++++++++++++++++--------- FabricTestExample/package.json | 2 +- FabricTestExample/yarn.lock | 14 +++++------ ios/RNSModule.h | 13 ++-------- ios/RNSModule.mm | 18 ++++---------- 5 files changed, 42 insertions(+), 45 deletions(-) diff --git a/FabricTestExample/ios/Podfile.lock b/FabricTestExample/ios/Podfile.lock index 988ec899b4..88cdb20b38 100644 --- a/FabricTestExample/ios/Podfile.lock +++ b/FabricTestExample/ios/Podfile.lock @@ -1117,7 +1117,7 @@ PODS: - React-Codegen - React-RCTFabric - ReactCommon/turbomodule/core - - RNReanimated (3.4.2): + - RNReanimated (3.5.0): - DoubleConversion - FBLazyVector - glog @@ -1147,23 +1147,39 @@ PODS: - React-RCTText - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.25.0): - - RCT-Folly + - RNScreens (3.27.0): + - hermes-engine + - RCT-Folly (= 2021.07.22.00) - RCTRequired - RCTTypeSafety - - React - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-graphics + - React-NativeModulesApple - React-RCTFabric + - React-utils + - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNScreens/common (= 3.25.0) - - RNScreens/common (3.25.0): - - RCT-Folly + - RNScreens/common (= 3.27.0) + - Yoga + - RNScreens/common (3.27.0): + - hermes-engine + - RCT-Folly (= 2021.07.22.00) - RCTRequired - RCTTypeSafety - - React - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-graphics + - React-NativeModulesApple - React-RCTFabric + - React-utils + - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core + - Yoga - SocketRocket (0.6.1) - Yoga (1.14.0) - YogaKit (1.18.1): @@ -1395,7 +1411,7 @@ SPEC CHECKSUMS: React-perflogger: 496a1a3dc6737f964107cb3ddae7f9e265ddda58 React-RCTActionSheet: 02904b932b50e680f4e26e7a686b33ebf7ef3c00 React-RCTAnimation: 88feaf0a85648fb8fd497ce749829774910276d6 - React-RCTAppDelegate: eeb2ec11cb348b65351701061d26d8c47c909ac0 + React-RCTAppDelegate: 5fea7578a4c36ee329193478d0f88a46504a70e6 React-RCTBlob: 0dbc9e2a13d241b37d46b53e54630cbad1f0e141 React-RCTFabric: 0d443ab3cc3f0af82442ec95747d503cee955f26 React-RCTImage: b111645ab901f8e59fc68fbe31f5731bdbeef087 @@ -1410,12 +1426,12 @@ SPEC CHECKSUMS: React-utils: b79f2411931f9d3ea5781404dcbb2fa8a837e13a ReactCommon: 4b2bdcb50a3543e1c2b2849ad44533686610826d RNGestureHandler: 0f92ab218707c97810df75609886828ee1b7c5e3 - RNReanimated: 5008fe999d57038a1c5c1163044854d453f41b98 - RNScreens: cba72a26a6c967765a8388fe85f78e7771012ca1 + RNReanimated: 289b197b8950db857982e178e0b4c7fe2dbf33a7 + RNScreens: 8e44ede8be80fbd17005680b7c86722a42d8dc73 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 3efc43e0d48686ce2e8c60f99d4e6bd349aff981 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: d716d8e81b552e087be1da3141d7f21ebb4aa80a -COCOAPODS: 1.11.3 +COCOAPODS: 1.14.2 diff --git a/FabricTestExample/package.json b/FabricTestExample/package.json index 418f880485..6fb36f3c9f 100644 --- a/FabricTestExample/package.json +++ b/FabricTestExample/package.json @@ -18,7 +18,7 @@ "react": "18.2.0", "react-native": "0.72.4", "react-native-gesture-handler": "^2.12.1", - "react-native-reanimated": "3.4.2", + "react-native-reanimated": "3.5.0", "react-native-safe-area-context": "^4.7.1", "react-native-screens": "link:../" }, diff --git a/FabricTestExample/yarn.lock b/FabricTestExample/yarn.lock index 91743e1419..f95e7d17f2 100644 --- a/FabricTestExample/yarn.lock +++ b/FabricTestExample/yarn.lock @@ -6112,10 +6112,10 @@ react-native-gesture-handler@^2.12.1: lodash "^4.17.21" prop-types "^15.7.2" -react-native-reanimated@3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.4.2.tgz#744154fead6d8d31d5bd9ac617d8c84d74a6f697" - integrity sha512-FbtG+f1PB005vDTJSv4zAnTK7nNXi+FjFgbAM5gOzIZDajfph2BFMSUstzIsN8T77+OKuugUBmcTqLnQ24EBVg== +react-native-reanimated@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.5.0.tgz#f6ecac80f6263de397e2e105ce5d9caf0397621e" + integrity sha512-om2AfxCD0YyBvGADJ5Ql38CKIJ8MXZTTpve1jt94TcRjLHXui24wYomoumSnnBQEfeRDzjwpmFdqcLtJ5mU5Pg== dependencies: "@babel/plugin-transform-object-assign" "^7.16.7" "@babel/preset-typescript" "^7.16.7" @@ -6128,10 +6128,8 @@ react-native-safe-area-context@^4.7.1: integrity sha512-X2pJG2ttmAbiGlItWedvDkZg1T1ikmEDiz+7HsiIwAIm2UbFqlhqn+B1JF53mSxPzdNaDcCQVHRNPvj8oFu6Yg== "react-native-screens@link:..": - version "3.26.0" - dependencies: - react-freeze "^1.0.0" - warn-once "^0.1.0" + version "0.0.0" + uid "" react-native@0.72.4: version "0.72.4" diff --git a/ios/RNSModule.h b/ios/RNSModule.h index 1ae443be10..a0a50a5b82 100644 --- a/ios/RNSModule.h +++ b/ios/RNSModule.h @@ -1,15 +1,6 @@ -#ifdef RCT_NEW_ARCH_ENABLED -#import -#else -#import -#endif +#import -@interface RNSModule : NSObject -#ifdef RCT_NEW_ARCH_ENABLED - -#else - -#endif +@interface RNSModule : NSObject - (nonnull NSArray *)_startTransition:(nonnull NSNumber *)stackTag; - (bool)_updateTransition:(nonnull NSNumber *)stackTag progress:(double)progress; diff --git a/ios/RNSModule.mm b/ios/RNSModule.mm index faa27155b7..085c90f5ef 100644 --- a/ios/RNSModule.mm +++ b/ios/RNSModule.mm @@ -22,17 +22,17 @@ - (dispatch_queue_t)methodQueue return dispatch_get_main_queue(); } -RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(startTransition:(nonnull NSNumber *)stackTag) +RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(startTransition : (nonnull NSNumber *)stackTag) { return [self _startTransition:stackTag]; } -RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(updateTransition:(nonnull NSNumber *)stackTag progress:(double)progress) +RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(updateTransition : (nonnull NSNumber *)stackTag progress : (double)progress) { return @([self _updateTransition:stackTag progress:progress]); } -RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(finishTransition:(nonnull NSNumber *)stackTag canceled:(bool)canceled) +RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(finishTransition : (nonnull NSNumber *)stackTag canceled : (bool)canceled) { return @([self _finishTransition:stackTag canceled:canceled]); } @@ -42,21 +42,13 @@ - (RNSScreenStackView *)getScreenStackView:(NSNumber *)reactTag RCTAssertMainQueue(); RNSScreenStackView *view; #ifdef RCT_NEW_ARCH_ENABLED - view = [self.viewRegistry_DEPRECATED viewForReactTag:reactTag]; + view = (RNSScreenStackView *)[self.viewRegistry_DEPRECATED viewForReactTag:reactTag]; #else view = (RNSScreenStackView *)[self.bridge.uiManager viewForReactTag:reactTag]; #endif // RCT_NEW_ARCH_ENABLED return view; } -#ifdef RCT_NEW_ARCH_ENABLED -- (std::shared_ptr)getTurboModule: - (const facebook::react::ObjCTurboModule::InitParams &)params -{ - return std::make_shared(params); -} -#endif - - (nonnull NSArray *)_startTransition:(nonnull NSNumber *)stackTag { RCTAssertMainQueue(); @@ -72,7 +64,7 @@ - (RNSScreenStackView *)getScreenStackView:(NSNumber *)reactTag NSNumber *belowTopScreen = screens[screenCount - 2].view.reactTag; screens[screenCount - 2].view.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); isActiveTransition = true; - screenTags = @[topScreen, belowTopScreen]; + screenTags = @[ topScreen, belowTopScreen ]; } [stackView startScreenTransition]; return screenTags;