mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ec5a4301a3
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35117 This mimics some behavior we have in Android that allow uesers to turn on selectively TM and Fabric. Notice that if fabric is enabled, TM must be enabled as well, otherwise the app won't work ## Changelog [iOS][Added] - Added the possibility to selectively enable TM and Fabric with the new Architecture Reviewed By: cortinico Differential Revision: D40794328 fbshipit-source-id: b7fc7bb819d05566dcd335832cab224f80b23346
53 lines
1.2 KiB
Objective-C
53 lines
1.2 KiB
Objective-C
/*
|
|
* 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 <Foundation/Foundation.h>
|
|
#import <React/RCTBridge.h>
|
|
#import <React/RCTRootView.h>
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#if RCT_NEW_ARCH_ENABLED
|
|
|
|
#ifndef RCT_USE_HERMES
|
|
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
|
|
#define RCT_USE_HERMES 1
|
|
#else
|
|
#define RCT_USE_HERMES 0
|
|
#endif
|
|
#endif
|
|
|
|
#if RCT_USE_HERMES
|
|
#import <reacthermes/HermesExecutorFactory.h>
|
|
#else
|
|
#import <React/JSCExecutorFactory.h>
|
|
#endif
|
|
|
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
#endif
|
|
|
|
#if RCT_NEW_ARCH_ENABLED
|
|
RCT_EXTERN id<RCTTurboModule> RCTAppSetupDefaultModuleFromClass(Class moduleClass);
|
|
|
|
std::unique_ptr<facebook::react::JSExecutorFactory> RCTAppSetupDefaultJsExecutorFactory(
|
|
RCTBridge *bridge,
|
|
RCTTurboModuleManager *turboModuleManager);
|
|
#endif
|
|
|
|
#endif // __cplusplus
|
|
|
|
RCT_EXTERN_C_BEGIN
|
|
|
|
void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled);
|
|
UIView *RCTAppSetupDefaultRootView(
|
|
RCTBridge *bridge,
|
|
NSString *moduleName,
|
|
NSDictionary *initialProperties,
|
|
BOOL fabricEnabled);
|
|
|
|
RCT_EXTERN_C_END
|