From 50c21113845ba2b8a9296fe9f07526474eec331b Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Mon, 27 Jul 2026 09:32:49 -0700 Subject: [PATCH] Drop RCT_EXPORT_METHOD from RCTDevLoadingView TurboModule (#57680) Summary: Pull Request resolved: https://github.com/react/react-native/pull/57680 Changelog: [Internal] `RCTDevLoadingView` is a TurboModule: it conforms to `NativeDevLoadingViewSpec` 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 `NativeDevLoadingViewSpec` 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: D113579873 fbshipit-source-id: 78a43f3586b2b7433fad1ab13be50fae63197870 --- .../react-native/React/CoreModules/RCTDevLoadingView.mm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm index 3475fa39350..1ae546d91fe 100644 --- a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm +++ b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm @@ -244,16 +244,17 @@ RCT_EXPORT_MODULE() }); } -RCT_EXPORT_METHOD( - showMessage : (NSString *)message withColor : (NSNumber *__nonnull)color withBackgroundColor : (NSNumber *__nonnull) - backgroundColor withDismissButton : (NSNumber *)dismissButton) +- (void)showMessage:(NSString *)message + withColor:(NSNumber *__nonnull)color + withBackgroundColor:(NSNumber *__nonnull)backgroundColor + withDismissButton:(NSNumber *)dismissButton { [self showMessage:message color:[RCTConvert UIColor:color] backgroundColor:[RCTConvert UIColor:backgroundColor] dismissButton:[dismissButton boolValue]]; } -RCT_EXPORT_METHOD(hide) +- (void)hide { if (!RCTDevLoadingViewGetEnabled()) { return;