Drop RCT_EXPORT_METHOD from RCTDevMenu TurboModule (#57681)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57681

Changelog: [Internal]

`RCTDevMenu` is a TurboModule: it conforms to `NativeDevMenuSpec` and implements `getTurboModule:` returning the codegen'd `...SpecJSI`. For TurboModules, the JS->ObjC dispatch is driven by codegen (the generated spec supplies the `selector` and argument kinds, invoked at runtime via `NSMethodSignature` / `NSInvocation`), not by the `RCT_EXPORT_METHOD` macro's `__rct_export__` metadata.

The exported methods here are async-void with concrete parameter types (no generic `id` requiring `RCTConvert` coercion), so the macro is not functionally required. Convert them to plain ObjC method declarations; conformance to the codegen'd `NativeDevMenuSpec` protocol keeps compiler-enforced signature parity.

Signature-only refactor with no change to the JS-facing API. Sync methods, methods with `id` params, and `constantsToExport` are intentionally left untouched.

Reviewed By: cortinico

Differential Revision: D113579872

fbshipit-source-id: 4f4f4803bc876e3558a5a33a935fcfc313c3c6e3
This commit is contained in:
Christoph Purrer authored and meta-codesync[bot] committed 2026-07-27 09:32:49 -07:00
1 parent 50c2111384
commit b13d489d84
1 file changed
+4 -4
@@ -430,7 +430,7 @@ RCT_EXPORT_MODULE()
return items;
}
RCT_EXPORT_METHOD(show)
- (void)show
{
if ((_actionSheet != nullptr) || RCTRunningInAppExtension() || !_devMenuEnabled) {
return;
@@ -495,13 +495,13 @@ RCT_EXPORT_METHOD(show)
return ((RCTDevSettings *)[_moduleRegistry moduleForName:"DevSettings"]).isShakeToShowDevMenuEnabled;
}
RCT_EXPORT_METHOD(reload)
- (void)reload
{
WARN_DEPRECATED_DEV_MENU_EXPORT();
RCTTriggerReloadCommandListeners(@"Unknown from JS");
}
RCT_EXPORT_METHOD(setProfilingEnabled : (BOOL)enabled)
- (void)setProfilingEnabled:(BOOL)enabled
{
WARN_DEPRECATED_DEV_MENU_EXPORT();
((RCTDevSettings *)[_moduleRegistry moduleForName:"DevSettings"]).isProfilingEnabled = enabled;
@@ -512,7 +512,7 @@ RCT_EXPORT_METHOD(setProfilingEnabled : (BOOL)enabled)
return ((RCTDevSettings *)[_moduleRegistry moduleForName:"DevSettings"]).isProfilingEnabled;
}
RCT_EXPORT_METHOD(setHotLoadingEnabled : (BOOL)enabled)
- (void)setHotLoadingEnabled:(BOOL)enabled
{
WARN_DEPRECATED_DEV_MENU_EXPORT();
((RCTDevSettings *)[_moduleRegistry moduleForName:"DevSettings"]).isHotLoadingEnabled = enabled;