Skip to content

Commit

Permalink
Fix fabric build
Browse files Browse the repository at this point in the history
  • Loading branch information
piaskowyk committed Nov 3, 2023
1 parent 0cbae55 commit 07b7348
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 45 deletions.
40 changes: 28 additions & 12 deletions FabricTestExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ PODS:
- React-Codegen
- React-RCTFabric
- ReactCommon/turbomodule/core
- RNReanimated (3.4.2):
- RNReanimated (3.5.0):
- DoubleConversion
- FBLazyVector
- glog
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion FabricTestExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:../"
},
Expand Down
14 changes: 6 additions & 8 deletions FabricTestExample/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 ""

[email protected]:
version "0.72.4"
Expand Down
13 changes: 2 additions & 11 deletions ios/RNSModule.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#ifdef RCT_NEW_ARCH_ENABLED
#import <rnscreens/rnscreens.h>
#else
#import <React/RCTBridge.h>
#endif
#import <React/RCTBridgeModule.h>

@interface RNSModule : NSObject
#ifdef RCT_NEW_ARCH_ENABLED
<NativeScreensModuleSpec>
#else
<RCTBridgeModule>
#endif
@interface RNSModule : NSObject <RCTBridgeModule>

- (nonnull NSArray<NSNumber *> *)_startTransition:(nonnull NSNumber *)stackTag;
- (bool)_updateTransition:(nonnull NSNumber *)stackTag progress:(double)progress;
Expand Down
18 changes: 5 additions & 13 deletions ios/RNSModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand All @@ -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<facebook::react::TurboModule>)getTurboModule:
(const facebook::react::ObjCTurboModule::InitParams &)params
{
return std::make_shared<facebook::react::NativeScreensModuleSpecJSI>(params);
}
#endif

- (nonnull NSArray<NSNumber *> *)_startTransition:(nonnull NSNumber *)stackTag
{
RCTAssertMainQueue();
Expand All @@ -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;
Expand Down

0 comments on commit 07b7348

Please sign in to comment.