mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
987e5197f0
Summary: This adds internal script to automatically sync the plugins definition. For github consumption, the CoreModulesPlugins.* will stay checked in, nothing change. Reviewed By: RSNara Differential Revision: D16102352 fbshipit-source-id: 8f74ea9dde046183ae620682fd7e181b4cc95a94
33 lines
760 B
Plaintext
33 lines
760 B
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>
|
|
|
|
static std::unordered_map<std::string, Class (*)(void)> sCoreModuleClassMap = {
|
|
{"PlatformConstants", RCTPlatformCls},
|
|
};
|
|
|
|
Class RCTCoreModulesClassProvider(const char *name) {
|
|
auto p = sCoreModuleClassMap.find(name);
|
|
if (p != sCoreModuleClassMap.end()) {
|
|
auto classFunc = p->second;
|
|
return classFunc();
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
#endif // RN_DISABLE_OSS_PLUGIN_HEADER
|