Files
react-native/React/AppSetup/RCTAppSetupUtils.h
T
Sota Ogo 1cd8f05ee8 Refactor app template setup util functions
Summary:
Changelog: [internal] Refactor RCTAppSetupUtils to c functions.

Since RCTAppSetupUtils doesn't retain any states, we don't need it to be a class.

Reviewed By: philIip

Differential Revision: D33084352

fbshipit-source-id: 1372a2737eafffa46ee6e5164a970dd12699c71c
2021-12-15 18:14:36 -08:00

44 lines
1.1 KiB
Objective-C

/*
* Copyright (c) Facebook, Inc. and its 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>
#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
RCT_EXTERN_C_BEGIN
void RCTAppSetupPrepareApp(UIApplication *application);
UIView *RCTAppSetupDefaultRootView(RCTBridge *bridge, NSString *moduleName, NSDictionary *initialProperties);
#if RCT_NEW_ARCH_ENABLED
id<RCTTurboModule> RCTAppSetupDefaultModuleFromClass(Class moduleClass);
std::unique_ptr<facebook::react::JSExecutorFactory> RCTAppSetupDefaultJsexecutorFactory(
RCTBridge *bridge,
RCTTurboModuleManager *turboModuleManager);
#endif
RCT_EXTERN_C_END