-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce RCTArchConfiguratorProtocol (#47306)
Summary: This PR introduces `RCTArchConfiguratorProtocol` for better separation of concerns inside of RCTAppDelegate. It's also a prerequisite for #46298 Discussed with cipolleschi ## Changelog: [IOS] [ADDED] - introduce RCTArchConfiguratorProtocol Pull Request resolved: #47306 Test Plan: - CI Green - Test if methods can be overriden Reviewed By: realsoelynn Differential Revision: D65212703 Pulled By: cipolleschi fbshipit-source-id: 9850fec31c421f0c6230e7e23d7a208d823d828f
- Loading branch information
1 parent
50e38cc
commit ec0dbb7
Showing
2 changed files
with
39 additions
and
23 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
32 changes: 32 additions & 0 deletions
32
packages/react-native/Libraries/AppDelegate/RCTArchConfiguratorProtocol.h
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#import <React/RCTConvert.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
@protocol RCTArchConfiguratorProtocol | ||
/// This method controls whether the `turboModules` feature of the New Architecture is turned on or off. | ||
/// | ||
/// @note: This is required to be rendering on Fabric (i.e. on the New Architecture). | ||
/// @return: `true` if the Turbo Native Module are enabled. Otherwise, it returns `false`. | ||
- (BOOL)turboModuleEnabled __attribute__((deprecated("Use newArchEnabled instead"))); | ||
|
||
/// This method controls whether the App will use the Fabric renderer of the New Architecture or not. | ||
/// | ||
/// @return: `true` if the Fabric Renderer is enabled. Otherwise, it returns `false`. | ||
- (BOOL)fabricEnabled __attribute__((deprecated("Use newArchEnabled instead"))); | ||
|
||
/// This method controls whether React Native's new initialization layer is enabled. | ||
/// | ||
/// @return: `true` if the new initialization layer is enabled. Otherwise returns `false`. | ||
- (BOOL)bridgelessEnabled __attribute__((deprecated("Use newArchEnabled instead"))); | ||
|
||
/// This method controls whether React Native uses new Architecture. | ||
/// | ||
/// @return: `true` if the new architecture is enabled. Otherwise returns `false`. | ||
- (BOOL)newArchEnabled; | ||
@end |