mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d8fda74c24
Summary: In D16805827, I moved `RCTImageLoader`, `RCTImageStoreManager`, and `RCTImageEditingManager` to `CoreModules`. This was necessary to turn `RCTImageLoader` into a TurboModule. However, after D17671288 landed, it's no longer necessary to have OSS NativeModules in `CoreModules`. Therefore, I'm moving these NativeModules back to `RCTImage`. Changelog: [iOS][Fixed] Move RCTImage NativeModules back to RCTImage Reviewed By: shergin Differential Revision: D17921612 fbshipit-source-id: 8ae36d2dc8deaf704313cbe2479bfa011ebcbfbc
44 lines
1.2 KiB
Plaintext
44 lines
1.2 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},
|
|
};
|
|
|
|
auto p = sCoreModuleClassMap.find(name);
|
|
if (p != sCoreModuleClassMap.end()) {
|
|
auto classFunc = p->second;
|
|
return classFunc();
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
#endif // RN_DISABLE_OSS_PLUGIN_HEADER
|