|
23 | 23 | #import <React/RCTSurfacePresenter.h> |
24 | 24 | #import <react/utils/ManagedObjectWrapper.h> |
25 | 25 |
|
| 26 | +#import <React/RCTComponentViewFactory.h> |
| 27 | + |
26 | 28 | static NSString *const kRNConcurrentRoot = @"concurrentRoot"; |
27 | 29 |
|
28 | | -@interface RNNAppDelegate () <RCTTurboModuleManagerDelegate> {} |
| 30 | +@interface RNNAppDelegate () <RCTTurboModuleManagerDelegate, |
| 31 | + RCTComponentViewFactoryComponentProvider> { |
| 32 | +} |
29 | 33 | @end |
30 | 34 |
|
31 | 35 | @implementation RNNAppDelegate |
32 | 36 |
|
33 | 37 | - (BOOL)application:(UIApplication *)application |
34 | | - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
| 38 | + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
35 | 39 |
|
36 | 40 | [self _setUpFeatureFlags]; |
37 | | - |
38 | | - // Copied from RCTAppDelegate, it private inside it |
39 | | - self.rootViewFactory = [self createRCTRootViewFactory]; |
40 | 41 |
|
41 | | - RCTAppSetupPrepareApp(application, self.newArchEnabled); |
42 | | - RCTSetNewArchEnabled(TRUE); |
| 42 | + // Copied from RCTAppDelegate, it private inside it |
| 43 | + self.rootViewFactory = [self createRCTRootViewFactory]; |
| 44 | + |
| 45 | + [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; |
| 46 | + |
| 47 | + RCTAppSetupPrepareApp(application, self.newArchEnabled); |
| 48 | + RCTSetNewArchEnabled(TRUE); |
43 | 49 | RCTEnableTurboModuleInterop(YES); |
44 | 50 | RCTEnableTurboModuleInteropBridgeProxy(YES); |
45 | 51 |
|
@@ -126,9 +132,8 @@ bool enableFixForViewCommandRace() override |
126 | 132 |
|
127 | 133 | - (void)_setUpFeatureFlags |
128 | 134 | { |
129 | | - if ([self bridgelessEnabled]) { |
130 | | - facebook::react::ReactNativeFeatureFlags::override(std::make_unique<RCTAppDelegateBridgelessFeatureFlags>()); |
131 | | - } |
| 135 | + facebook::react::ReactNativeFeatureFlags::override( |
| 136 | + std::make_unique<RCTAppDelegateBridgelessFeatureFlags>()); |
132 | 137 | } |
133 | 138 |
|
134 | 139 | @end |
|
0 commit comments