diff --git a/packages/react-native/React/Base/RCTBridge.mm b/packages/react-native/React/Base/RCTBridge.mm index 9aaf79bd0b9931..e5f9b8a5982bad 100644 --- a/packages/react-native/React/Base/RCTBridge.mm +++ b/packages/react-native/React/Base/RCTBridge.mm @@ -148,16 +148,6 @@ void RCTSetTurboModuleInteropBridgeProxyLogLevel(RCTBridgeProxyLoggingLevel logL bridgeProxyLoggingLevel = logLevel; } -static BOOL useTurboModuleInteropForAllTurboModules = NO; -BOOL RCTTurboModuleInteropForAllTurboModulesEnabled(void) -{ - return useTurboModuleInteropForAllTurboModules; -} -void RCTEnableTurboModuleInteropForAllTurboModules(BOOL enabled) -{ - useTurboModuleInteropForAllTurboModules = enabled; -} - // Turn on TurboModule sync execution of void methods static BOOL gTurboModuleEnableSyncVoidMethods = NO; BOOL RCTTurboModuleSyncVoidMethodsEnabled(void) diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm index b7e32bdead22a2..4e87312664262e 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm @@ -475,30 +475,18 @@ - (instancetype)initWithBridgeProxy:(RCTBridgeProxy *)bridgeProxy - (BOOL)_isTurboModule:(const char *)moduleName { - if (RCTTurboModuleInteropForAllTurboModulesEnabled()) { - return NO; - } - Class moduleClass = [self _getModuleClassFromName:moduleName]; return moduleClass != nil && (isTurboModuleClass(moduleClass) && ![moduleClass isSubclassOfClass:RCTCxxModule.class]); } - (BOOL)_isLegacyModule:(const char *)moduleName { - if (RCTTurboModuleInteropForAllTurboModulesEnabled()) { - return YES; - } - Class moduleClass = [self _getModuleClassFromName:moduleName]; return [self _isLegacyModuleClass:moduleClass]; } - (BOOL)_isLegacyModuleClass:(Class)moduleClass { - if (RCTTurboModuleInteropForAllTurboModulesEnabled()) { - return YES; - } - return moduleClass != nil && (!isTurboModuleClass(moduleClass) || [moduleClass isSubclassOfClass:RCTCxxModule.class]); }