diff --git a/React/Base/RCTConstants.h b/React/Base/RCTConstants.h index dd1e4fea579..14a5263f83a 100644 --- a/React/Base/RCTConstants.h +++ b/React/Base/RCTConstants.h @@ -15,9 +15,3 @@ RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollec */ RCT_EXTERN BOOL RCTExperimentGetPreemptiveViewAllocationDisabled(void); RCT_EXTERN void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value); - -/* - * Interop layer keep view hierarchy. - */ -RCT_EXTERN BOOL RCTGetInteropLayerKeepViewHierarchy(void); -RCT_EXTERN void RCTSetInteropLayerKeepViewHierarchy(BOOL value); diff --git a/React/Base/RCTConstants.m b/React/Base/RCTConstants.m index 4d564e08402..8d1e308acd9 100644 --- a/React/Base/RCTConstants.m +++ b/React/Base/RCTConstants.m @@ -24,18 +24,3 @@ void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value) { RCTExperimentPreemptiveViewAllocationDisabled = value; } - -/* - * Preemptive View Allocation - */ -static BOOL RCTInteropLayerKeepViewHierarchy = NO; - -BOOL RCTGetInteropLayerKeepViewHierarchy() -{ - return RCTInteropLayerKeepViewHierarchy; -} - -void RCTSetInteropLayerKeepViewHierarchy(BOOL value) -{ - RCTInteropLayerKeepViewHierarchy = value; -} diff --git a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm index 297111ddea9..f5f721f7f15 100644 --- a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm @@ -205,13 +205,9 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index"; for (NSDictionary *mountInstruction in _viewsToBeMounted) { NSNumber *index = mountInstruction[kRCTLegacyInteropChildIndexKey]; UIView *childView = mountInstruction[kRCTLegacyInteropChildComponentKey]; - if (RCTGetInteropLayerKeepViewHierarchy()) { - if ([childView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) { - UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childView).contentView; - [_adapter.paperView insertReactSubview:target atIndex:index.integerValue]; - } else { - [_adapter.paperView insertReactSubview:childView atIndex:index.integerValue]; - } + if ([childView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) { + UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childView).contentView; + [_adapter.paperView insertReactSubview:target atIndex:index.integerValue]; } else { [_adapter.paperView insertReactSubview:childView atIndex:index.integerValue]; } diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index b72a5c2629d..9088701a0be 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -263,10 +263,6 @@ static BackgroundExecutor RCTGetBackgroundExecutor() RCTExperimentSetPreemptiveViewAllocationDisabled(YES); } - RCTSetInteropLayerKeepViewHierarchy( - reactNativeConfig && - reactNativeConfig->getBool("react_native_new_architecture:interop_layer_keep_view_hierarchy")); - auto componentRegistryFactory = [factory = wrapManagedObject(_mountingManager.componentViewRegistry.componentViewFactory)]( EventDispatcher::Weak const &eventDispatcher, ContextContainer::Shared const &contextContainer) {