Skip to content

Commit 3621606

Browse files
okwasniewskifacebook-github-bot
authored andcommitted
feat(iOS): expose newArchEnabled, deprecate separate methods (facebook#46228)
Summary: This PR exposes the `newArchEnabled` flag and deprecates all of the separate methods to enable new architecture. As discussed with cipolleschi here: react-native-community/template#45 (comment) ## Changelog: [IOS] [DEPRECATED] - Deprecate turboModuleEnabled, fabricEnabled, bridgelessEnabled [IOS] [ADDED] - Add newArchEnabled method to RCTAppDelegate Pull Request resolved: facebook#46228 Test Plan: Test if switching newArchEnabled flag from AppDelegate works. Reviewed By: cortinico Differential Revision: D61849385 Pulled By: cipolleschi fbshipit-source-id: 8acf718386882679f00d2d5000b4432a523b34ac
1 parent 97b661c commit 3621606

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,22 @@ NS_ASSUME_NONNULL_BEGIN
148148
///
149149
/// @note: This is required to be rendering on Fabric (i.e. on the New Architecture).
150150
/// @return: `true` if the Turbo Native Module are enabled. Otherwise, it returns `false`.
151-
- (BOOL)turboModuleEnabled;
151+
- (BOOL)turboModuleEnabled __attribute__((deprecated("Use newArchEnabled instead")));
152152

153153
/// This method controls whether the App will use the Fabric renderer of the New Architecture or not.
154154
///
155155
/// @return: `true` if the Fabric Renderer is enabled. Otherwise, it returns `false`.
156-
- (BOOL)fabricEnabled;
156+
- (BOOL)fabricEnabled __attribute__((deprecated("Use newArchEnabled instead")));
157157

158158
/// This method controls whether React Native's new initialization layer is enabled.
159159
///
160160
/// @return: `true` if the new initialization layer is enabled. Otherwise returns `false`.
161-
- (BOOL)bridgelessEnabled;
161+
- (BOOL)bridgelessEnabled __attribute__((deprecated("Use newArchEnabled instead")));
162+
163+
/// This method controls whether React Native uses new Architecture.
164+
///
165+
/// @return: `true` if the new architecture is enabled. Otherwise returns `false`.
166+
- (BOOL)newArchEnabled;
162167

163168
/// Return the bundle URL for the main bundle.
164169
- (NSURL *__nullable)bundleURL;

0 commit comments

Comments
 (0)