mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36916 Changelog: [iOS][Removed] the bridge only behavior of eager initialization of native modules was coupled with the turbomodule infra, even though it didn't need to be. this eager initialized modules is a static list, and the bridge owner which is usually app scoped, can pass this list directly to the bridge instead. Reviewed By: sammy-SC Differential Revision: D45021784 fbshipit-source-id: f033661e0722f65ae971bd7ce27f8dc7de1173ad
27 lines
974 B
Objective-C
27 lines
974 B
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.
|
|
*/
|
|
|
|
/**
|
|
* A protocol that allows TurboModules to do lookup on other TurboModules.
|
|
* Calling these methods may cause a module to be synchronously instantiated.
|
|
*/
|
|
@protocol RCTTurboModuleRegistry <NSObject>
|
|
- (id)moduleForName:(const char *)moduleName;
|
|
|
|
/**
|
|
* Rationale:
|
|
* When TurboModules lookup other modules by name, we first check the TurboModule
|
|
* registry to see if a TurboModule exists with the respective name. In this case,
|
|
* we don't want a RedBox to be raised if the TurboModule isn't found.
|
|
*
|
|
* This method is deprecated and will be deleted after the migration from
|
|
* TurboModules to TurboModules is complete.
|
|
*/
|
|
- (id)moduleForName:(const char *)moduleName warnOnLookupFailure:(BOOL)warnOnLookupFailure;
|
|
- (BOOL)moduleIsInitialized:(const char *)moduleName;
|
|
@end
|