-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the Fabric Interop Layer automatic (#41656)
Summary: This change makes all the legacy components to go through the interop layer. It also introduce the `RCTFabricInteropLayerEnabled()` and the `RCTEnableFabricInteropLayer(BOOL)` functions to work as feature flags behind the change to completely disable the Interop layer. ## Changelog [iOS][Changed] - Make the Fabric Interop Layer automatic when the Nw architecture is enabled. Reviewed By: cortinico Differential Revision: D51586461
- Loading branch information
1 parent
1e22fa3
commit 82e8b28
Showing
8 changed files
with
20 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
#import <React/RCTSurfacePresenterBridgeAdapter.h> | ||
#import <react/renderer/runtimescheduler/RuntimeScheduler.h> | ||
#import "RCTAppSetupUtils.h" | ||
#import "RCTLegacyInteropComponents.h" | ||
|
||
#if RN_DISABLE_OSS_PLUGIN_HEADER | ||
#import <RCTTurboModulePlugin/RCTTurboModulePlugin.h> | ||
|
@@ -22,7 +21,6 @@ | |
#import <React/RCTComponentViewFactory.h> | ||
#import <React/RCTComponentViewProtocol.h> | ||
#import <React/RCTFabricSurface.h> | ||
#import <React/RCTLegacyViewManagerInteropComponentView.h> | ||
#import <React/RCTSurfaceHostingProxyRootView.h> | ||
#import <React/RCTSurfacePresenter.h> | ||
#import <ReactCommon/RCTContextContainerHandling.h> | ||
|
@@ -98,7 +96,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( | |
RCTEnableTurboModuleInteropBridgeProxy(YES); | ||
|
||
[self createReactHost]; | ||
Check failure on line 98 in packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm GitHub Actions / test_ios_rntester-Hermes
|
||
[self unstable_registerLegacyComponents]; | ||
[RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; | ||
RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:self.moduleName initialProperties:initProps]; | ||
|
||
|
@@ -116,10 +113,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( | |
contextContainer:_contextContainer]; | ||
self.bridge.surfacePresenter = self.bridgeAdapter.surfacePresenter; | ||
|
||
[self unstable_registerLegacyComponents]; | ||
[RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; | ||
} | ||
|
||
[RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; | ||
rootView = [self createRootViewWithBridge:self.bridge moduleName:self.moduleName initProps:initProps]; | ||
} | ||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | ||
|
@@ -267,13 +261,6 @@ - (Class)getModuleClassFromName:(const char *)name | |
|
||
#pragma mark - New Arch Utilities | ||
|
||
- (void)unstable_registerLegacyComponents | ||
{ | ||
for (NSString *legacyComponent in [RCTLegacyInteropComponents legacyInteropComponents]) { | ||
[RCTLegacyViewManagerInteropComponentView supportLegacyViewManagerWithName:legacyComponent]; | ||
} | ||
} | ||
|
||
- (void)createReactHost | ||
{ | ||
__weak __typeof(self) weakSelf = self; | ||
|
18 changes: 0 additions & 18 deletions
18
packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.h
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
packages/react-native/Libraries/AppDelegate/RCTLegacyInteropComponents.mm
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 0 additions & 137 deletions
137
packages/react-native/scripts/codegen/generate-legacy-interop-components.js
This file was deleted.
Oops, something went wrong.