File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 11
22#import " RNNAppDelegate.h"
33#import < ReactNativeNavigation/ReactNativeNavigation.h>
4+ #import < react/featureflags/ReactNativeFeatureFlags.h>
5+ #import < react/featureflags/ReactNativeFeatureFlagsDefaults.h>
46
57
68#import " RCTAppSetupUtils.h"
@@ -31,6 +33,8 @@ @implementation RNNAppDelegate
3133- (BOOL )application : (UIApplication *)application
3234 didFinishLaunchingWithOptions : (NSDictionary *)launchOptions {
3335
36+ [self _setUpFeatureFlags ];
37+
3438 // Copied from RCTAppDelegate, it private inside it
3539 self.rootViewFactory = [self createRCTRootViewFactory ];
3640
@@ -94,4 +98,38 @@ - (BOOL)concurrentRootEnabled {
9498 return true ;
9599}
96100
101+ #pragma mark - Feature Flags
102+
103+ class RCTAppDelegateBridgelessFeatureFlags : public facebook ::react::ReactNativeFeatureFlagsDefaults {
104+ public:
105+ bool enableBridgelessArchitecture () override
106+ {
107+ return true ;
108+ }
109+ bool enableFabricRenderer () override
110+ {
111+ return true ;
112+ }
113+ bool useTurboModules () override
114+ {
115+ return true ;
116+ }
117+ bool useNativeViewConfigsInBridgelessMode () override
118+ {
119+ return true ;
120+ }
121+ bool enableFixForViewCommandRace () override
122+ {
123+ return true ;
124+ }
125+ };
126+
127+ - (void )_setUpFeatureFlags
128+ {
129+ if ([self bridgelessEnabled ]) {
130+ facebook::react::ReactNativeFeatureFlags::override (std::make_unique<RCTAppDelegateBridgelessFeatureFlags>());
131+ }
132+ }
133+
97134@end
135+
You can’t perform that action at this time.
0 commit comments