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 1
1
2
2
#import " RNNAppDelegate.h"
3
3
#import < ReactNativeNavigation/ReactNativeNavigation.h>
4
+ #import < react/featureflags/ReactNativeFeatureFlags.h>
5
+ #import < react/featureflags/ReactNativeFeatureFlagsDefaults.h>
4
6
5
7
6
8
#import " RCTAppSetupUtils.h"
@@ -31,6 +33,8 @@ @implementation RNNAppDelegate
31
33
- (BOOL )application : (UIApplication *)application
32
34
didFinishLaunchingWithOptions : (NSDictionary *)launchOptions {
33
35
36
+ [self _setUpFeatureFlags ];
37
+
34
38
// Copied from RCTAppDelegate, it private inside it
35
39
self.rootViewFactory = [self createRCTRootViewFactory ];
36
40
@@ -94,4 +98,38 @@ - (BOOL)concurrentRootEnabled {
94
98
return true ;
95
99
}
96
100
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
+
97
134
@end
135
+
You can’t perform that action at this time.
0 commit comments