mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
6a9a76e420
Summary:
This is a redo of D16969764, with a few extensions.
## Changes
1. Move `RCTDevLoadingView.{h,m}` to `CoreModuels/RCTDevLoadingView.{h,mm}`
2. Extract ObjC API of `RCTDevLodingView` into `RCTDevLoadingViewProtocol` in `ReactInternal`.
3. Create API `RCTDevLoadingViewSetEnabled.h` in `ReactInternal` to enable/disable `RCTDevLoadingView`
Changelog:
[iOS][Added] - Make RCTDevLoadingView TurboModule-compatible
Reviewed By: PeteTheHeat
Differential Revision: D18642554
fbshipit-source-id: 6b62e27e128d98254b7a6d018399ec1c06e274fc
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
/**
|
|
* 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.
|
|
*
|
|
* @generated by an internal plugin build system
|
|
*/
|
|
|
|
#ifndef RN_DISABLE_OSS_PLUGIN_HEADER
|
|
|
|
// OSS-compatibility layer
|
|
|
|
#import "CoreModulesPlugins.h"
|
|
|
|
#import <string>
|
|
#import <unordered_map>
|
|
|
|
Class RCTCoreModulesClassProvider(const char *name) {
|
|
static std::unordered_map<std::string, Class (*)(void)> sCoreModuleClassMap = {
|
|
{"AccessibilityManager", RCTAccessibilityManagerCls},
|
|
{"Appearance", RCTAppearanceCls},
|
|
{"DeviceInfo", RCTDeviceInfoCls},
|
|
{"ExceptionsManager", RCTExceptionsManagerCls},
|
|
{"PlatformConstants", RCTPlatformCls},
|
|
{"Clipboard", RCTClipboardCls},
|
|
{"I18nManager", RCTI18nManagerCls},
|
|
{"SourceCode", RCTSourceCodeCls},
|
|
{"ActionSheetManager", RCTActionSheetManagerCls},
|
|
{"AlertManager", RCTAlertManagerCls},
|
|
{"AsyncLocalStorage", RCTAsyncLocalStorageCls},
|
|
{"Timing", RCTTimingCls},
|
|
{"StatusBarManager", RCTStatusBarManagerCls},
|
|
{"KeyboardObserver", RCTKeyboardObserverCls},
|
|
{"AppState", RCTAppStateCls},
|
|
{"PerfMonitor", RCTPerfMonitorCls},
|
|
{"DevMenu", RCTDevMenuCls},
|
|
{"DevSettings", RCTDevSettingsCls},
|
|
{"RedBox", RCTRedBoxCls},
|
|
{"LogBox", RCTLogBoxCls},
|
|
{"TVNavigationEventEmitter", RCTTVNavigationEventEmitterCls},
|
|
{"WebSocketExecutor", RCTWebSocketExecutorCls},
|
|
{"WebSocketModule", RCTWebSocketModuleCls},
|
|
{"DevLoadingView", RCTDevLoadingViewCls},
|
|
};
|
|
|
|
auto p = sCoreModuleClassMap.find(name);
|
|
if (p != sCoreModuleClassMap.end()) {
|
|
auto classFunc = p->second;
|
|
return classFunc();
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
#endif // RN_DISABLE_OSS_PLUGIN_HEADER
|