From 4a4b474059edfccda96797dedbe9bcdd13b45bd4 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 01/13] Drop RCT_EXPORT_METHOD from RCTClipboard TurboModule (#57671) Summary: Changelog: [Internal] `RCTClipboard` is a TurboModule: it conforms to `NativeClipboardSpec` 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 `NativeClipboardSpec` 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. Differential Revision: D113568495 --- packages/react-native/React/CoreModules/RCTClipboard.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTClipboard.mm b/packages/react-native/React/CoreModules/RCTClipboard.mm index f057c34f704c..ab5aea968ff7 100644 --- a/packages/react-native/React/CoreModules/RCTClipboard.mm +++ b/packages/react-native/React/CoreModules/RCTClipboard.mm @@ -26,7 +26,7 @@ - (dispatch_queue_t)methodQueue return dispatch_get_main_queue(); } -RCT_EXPORT_METHOD(setString : (NSString *)content) +- (void)setString:(NSString *)content { #if !TARGET_OS_TV UIPasteboard *clipboard = [UIPasteboard generalPasteboard]; @@ -34,7 +34,7 @@ - (dispatch_queue_t)methodQueue #endif } -RCT_EXPORT_METHOD(getString : (RCTPromiseResolveBlock)resolve reject : (__unused RCTPromiseRejectBlock)reject) +- (void)getString:(RCTPromiseResolveBlock)resolve reject:(__unused RCTPromiseRejectBlock)reject { #if !TARGET_OS_TV UIPasteboard *clipboard = [UIPasteboard generalPasteboard]; From 954cc8ebee6415223fe92e71a26fa8b6039c06a1 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 02/13] Drop RCT_EXPORT_METHOD from RCTAccessibilityManager TurboModule Summary: Changelog: [Internal] `RCTAccessibilityManager` is a TurboModule: it conforms to `NativeAccessibilityManagerSpec` 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 `NativeAccessibilityManagerSpec` 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. Differential Revision: D113579886 --- .../CoreModules/RCTAccessibilityManager.mm | 49 ++++++++----------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTAccessibilityManager.mm b/packages/react-native/React/CoreModules/RCTAccessibilityManager.mm index 19895271f141..29b03e6c1c79 100644 --- a/packages/react-native/React/CoreModules/RCTAccessibilityManager.mm +++ b/packages/react-native/React/CoreModules/RCTAccessibilityManager.mm @@ -274,9 +274,8 @@ - (void)setMultipliers:(NSDictionary *)multipliers return _multipliers; } -RCT_EXPORT_METHOD( - setAccessibilityContentSizeMultipliers : ( - JS::NativeAccessibilityManager::SpecSetAccessibilityContentSizeMultipliersJSMultipliers &)JSMultipliers) +- (void)setAccessibilityContentSizeMultipliers: + (JS::NativeAccessibilityManager::SpecSetAccessibilityContentSizeMultipliersJSMultipliers &)JSMultipliers { NSMutableDictionary *multipliers = [NSMutableDictionary new]; setMultipliers(multipliers, UIContentSizeCategoryExtraSmall, JSMultipliers.extraSmall()); @@ -308,7 +307,7 @@ static void setMultipliers( } } -RCT_EXPORT_METHOD(setAccessibilityFocus : (double)reactTag) +- (void)setAccessibilityFocus:(double)reactTag { dispatch_async(dispatch_get_main_queue(), ^{ UIView *view = [self.viewRegistry_DEPRECATED viewForReactTag:@(reactTag)]; @@ -316,14 +315,16 @@ static void setMultipliers( }); } -RCT_EXPORT_METHOD(announceForAccessibility : (NSString *)announcement) +- (void)announceForAccessibility:(NSString *)announcement { UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, announcement); } -RCT_EXPORT_METHOD( - announceForAccessibilityWithOptions : (NSString *)announcement options : ( - JS::NativeAccessibilityManager::SpecAnnounceForAccessibilityWithOptionsOptions &)options) +- (void) + announceForAccessibilityWithOptions:(NSString *)announcement + options: + (JS::NativeAccessibilityManager::SpecAnnounceForAccessibilityWithOptionsOptions &) + options { NSMutableDictionary *attrsDictionary = [NSMutableDictionary new]; if (options.queue()) { @@ -356,47 +357,41 @@ static void setMultipliers( } } -RCT_EXPORT_METHOD(getMultiplier : (RCTResponseSenderBlock)callback) +- (void)getMultiplier:(RCTResponseSenderBlock)callback { if (callback) { callback(@[ @(self.multiplier) ]); } } -RCT_EXPORT_METHOD( - getCurrentBoldTextState : (RCTResponseSenderBlock)onSuccess onError : (__unused RCTResponseSenderBlock)onError) +- (void)getCurrentBoldTextState:(RCTResponseSenderBlock)onSuccess onError:(__unused RCTResponseSenderBlock)onError { onSuccess(@[ @(_isBoldTextEnabled) ]); } -RCT_EXPORT_METHOD( - getCurrentGrayscaleState : (RCTResponseSenderBlock)onSuccess onError : (__unused RCTResponseSenderBlock)onError) +- (void)getCurrentGrayscaleState:(RCTResponseSenderBlock)onSuccess onError:(__unused RCTResponseSenderBlock)onError { onSuccess(@[ @(_isGrayscaleEnabled) ]); } -RCT_EXPORT_METHOD( - getCurrentInvertColorsState : (RCTResponseSenderBlock)onSuccess onError : (__unused RCTResponseSenderBlock)onError) +- (void)getCurrentInvertColorsState:(RCTResponseSenderBlock)onSuccess onError:(__unused RCTResponseSenderBlock)onError { onSuccess(@[ @(_isInvertColorsEnabled) ]); } -RCT_EXPORT_METHOD( - getCurrentReduceMotionState : (RCTResponseSenderBlock)onSuccess onError : (__unused RCTResponseSenderBlock)onError) +- (void)getCurrentReduceMotionState:(RCTResponseSenderBlock)onSuccess onError:(__unused RCTResponseSenderBlock)onError { onSuccess(@[ @(_isReduceMotionEnabled) ]); } -RCT_EXPORT_METHOD( - getCurrentDarkerSystemColorsState : (RCTResponseSenderBlock)onSuccess onError : (__unused RCTResponseSenderBlock) - onError) +- (void)getCurrentDarkerSystemColorsState:(RCTResponseSenderBlock)onSuccess + onError:(__unused RCTResponseSenderBlock)onError { onSuccess(@[ @(_isDarkerSystemColorsEnabled) ]); } -RCT_EXPORT_METHOD( - getCurrentPrefersCrossFadeTransitionsState : (RCTResponseSenderBlock) - onSuccess onError : (__unused RCTResponseSenderBlock)onError) +- (void)getCurrentPrefersCrossFadeTransitionsState:(RCTResponseSenderBlock)onSuccess + onError:(__unused RCTResponseSenderBlock)onError { if (@available(iOS 14.0, *)) { onSuccess(@[ @(UIAccessibilityPrefersCrossFadeTransitions()) ]); @@ -405,15 +400,13 @@ static void setMultipliers( } } -RCT_EXPORT_METHOD( - getCurrentReduceTransparencyState : (RCTResponseSenderBlock)onSuccess onError : (__unused RCTResponseSenderBlock) - onError) +- (void)getCurrentReduceTransparencyState:(RCTResponseSenderBlock)onSuccess + onError:(__unused RCTResponseSenderBlock)onError { onSuccess(@[ @(_isReduceTransparencyEnabled) ]); } -RCT_EXPORT_METHOD( - getCurrentVoiceOverState : (RCTResponseSenderBlock)onSuccess onError : (__unused RCTResponseSenderBlock)onError) +- (void)getCurrentVoiceOverState:(RCTResponseSenderBlock)onSuccess onError:(__unused RCTResponseSenderBlock)onError { onSuccess(@[ @(_isVoiceOverEnabled) ]); } From 08e9e9ad611a93d81c2d023228dbda69645daebe Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 03/13] Drop RCT_EXPORT_METHOD from RCTActionSheetManager TurboModule (#57673) Summary: Changelog: [Internal] `RCTActionSheetManager` is a TurboModule: it conforms to `NativeActionSheetManagerSpec` 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 `NativeActionSheetManagerSpec` 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. Differential Revision: D113579871 --- .../React/CoreModules/RCTActionSheetManager.mm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTActionSheetManager.mm b/packages/react-native/React/CoreModules/RCTActionSheetManager.mm index 360b366ccc3e..41150ac877b0 100644 --- a/packages/react-native/React/CoreModules/RCTActionSheetManager.mm +++ b/packages/react-native/React/CoreModules/RCTActionSheetManager.mm @@ -76,9 +76,8 @@ - (void)presentViewController:(UIViewController *)alertController [parentViewController presentViewController:alertController animated:YES completion:nil]; } -RCT_EXPORT_METHOD( - showActionSheetWithOptions : (JS::NativeActionSheetManager::SpecShowActionSheetWithOptionsOptions &) - options callback : (RCTResponseSenderBlock)callback) +- (void)showActionSheetWithOptions:(JS::NativeActionSheetManager::SpecShowActionSheetWithOptionsOptions &)options + callback:(RCTResponseSenderBlock)callback { if (RCTRunningInAppExtension()) { RCTLogError(@"Unable to show action sheet from app extension"); @@ -219,7 +218,7 @@ - (void)presentViewController:(UIViewController *)alertController }); } -RCT_EXPORT_METHOD(dismissActionSheet) +- (void)dismissActionSheet { if (_alertControllers.count == 0) { RCTLogWarn(@"Unable to dismiss action sheet"); @@ -232,10 +231,10 @@ - (void)presentViewController:(UIViewController *)alertController }); } -RCT_EXPORT_METHOD( - showShareActionSheetWithOptions : (JS::NativeActionSheetManager::SpecShowShareActionSheetWithOptionsOptions &) - options failureCallback : (RCTResponseSenderBlock)failureCallback successCallback : (RCTResponseSenderBlock) - successCallback) +- (void)showShareActionSheetWithOptions: + (JS::NativeActionSheetManager::SpecShowShareActionSheetWithOptionsOptions &)options + failureCallback:(RCTResponseSenderBlock)failureCallback + successCallback:(RCTResponseSenderBlock)successCallback { if (RCTRunningInAppExtension()) { RCTLogError(@"Unable to show action sheet from app extension"); From dc03d176c6db3477d63bff21fd5f0aaebb68792d Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 04/13] Drop RCT_EXPORT_METHOD from RCTAlertManager TurboModule (#57675) Summary: Changelog: [Internal] `RCTAlertManager` is a TurboModule: it conforms to `NativeAlertManagerSpec` 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 `NativeAlertManagerSpec` 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. Differential Revision: D113579876 --- packages/react-native/React/CoreModules/RCTAlertManager.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/CoreModules/RCTAlertManager.mm b/packages/react-native/React/CoreModules/RCTAlertManager.mm index 8dbe57b90ba3..2d9e8290807b 100644 --- a/packages/react-native/React/CoreModules/RCTAlertManager.mm +++ b/packages/react-native/React/CoreModules/RCTAlertManager.mm @@ -65,7 +65,7 @@ - (void)invalidate * The key from the `buttons` dictionary is passed back in the callback on click. * Buttons are displayed in the order they are specified. */ -RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback : (RCTResponseSenderBlock)callback) +- (void)alertWithArgs:(JS::NativeAlertManager::Args &)args callback:(RCTResponseSenderBlock)callback { NSString *title = [RCTConvert NSString:args.title()]; NSString *message = [RCTConvert NSString:args.message()]; From 0f274826b4a3dded3fa0e68410504cfc464366ff Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 05/13] Drop RCT_EXPORT_METHOD from RCTAppState TurboModule (#57676) Summary: Changelog: [Internal] `RCTAppState` is a TurboModule: it conforms to `NativeAppStateSpec` 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 `NativeAppStateSpec` 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. Differential Revision: D113579877 --- packages/react-native/React/CoreModules/RCTAppState.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/CoreModules/RCTAppState.mm b/packages/react-native/React/CoreModules/RCTAppState.mm index d504c525bb9d..7ca35bfefefd 100644 --- a/packages/react-native/React/CoreModules/RCTAppState.mm +++ b/packages/react-native/React/CoreModules/RCTAppState.mm @@ -135,7 +135,7 @@ - (void)handleAppStateDidChange:(NSNotification *)notification /** * Get the current background/foreground state of the app */ -RCT_EXPORT_METHOD(getCurrentAppState : (RCTResponseSenderBlock)callback error : (__unused RCTResponseSenderBlock)error) +- (void)getCurrentAppState:(RCTResponseSenderBlock)callback error:(__unused RCTResponseSenderBlock)error { callback(@[ @{@"app_state" : RCTCurrentAppState()} ]); } From 8330c13736a3e50214d3d2fa2cf336b2c11ec2df Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 06/13] Drop RCT_EXPORT_METHOD from RCTAppearance TurboModule (#57679) Summary: Changelog: [Internal] `RCTAppearance` is a TurboModule: it conforms to `NativeAppearanceSpec` 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 `NativeAppearanceSpec` 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. Differential Revision: D113579869 --- packages/react-native/React/CoreModules/RCTAppearance.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/CoreModules/RCTAppearance.mm b/packages/react-native/React/CoreModules/RCTAppearance.mm index d25d9f64e6bd..76df5b10ac2a 100644 --- a/packages/react-native/React/CoreModules/RCTAppearance.mm +++ b/packages/react-native/React/CoreModules/RCTAppearance.mm @@ -109,7 +109,7 @@ - (dispatch_queue_t)methodQueue return std::make_shared(params); } -RCT_EXPORT_METHOD(setColorScheme : (NSString *)style) +- (void)setColorScheme:(NSString *)style { UIUserInterfaceStyle userInterfaceStyle = [RCTConvert UIUserInterfaceStyle:style]; NSMutableArray *windows = [NSMutableArray new]; From 71a3241bc842b7b251bc70789cfb3d5d553230ec Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 07/13] Drop RCT_EXPORT_METHOD from RCTDevLoadingView TurboModule (#57680) Summary: 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. Differential Revision: D113579873 --- .../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 3475fa39350c..1ae546d91fe7 100644 --- a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm +++ b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm @@ -244,16 +244,17 @@ - (void)showMessage:(NSString *)message }); } -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; From 03496c7f51fe505b7de8b3c4c019e7ced1f2f656 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 08/13] Drop RCT_EXPORT_METHOD from RCTDevMenu TurboModule (#57681) Summary: 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. Differential Revision: D113579872 --- packages/react-native/React/CoreModules/RCTDevMenu.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTDevMenu.mm b/packages/react-native/React/CoreModules/RCTDevMenu.mm index 890c1596df74..883b4ba7f8e1 100644 --- a/packages/react-native/React/CoreModules/RCTDevMenu.mm +++ b/packages/react-native/React/CoreModules/RCTDevMenu.mm @@ -430,7 +430,7 @@ - (void)setDefaultJSBundle return items; } -RCT_EXPORT_METHOD(show) +- (void)show { if ((_actionSheet != nullptr) || RCTRunningInAppExtension() || !_devMenuEnabled) { return; @@ -495,13 +495,13 @@ - (BOOL)shakeToShow 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 @@ - (BOOL)profilingEnabled 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; From 7ac85076aec6f86b9fd560cbfabf1a48635bd429 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 09/13] Drop RCT_EXPORT_METHOD from RCTDevSettings TurboModule (#57682) Summary: Changelog: [Internal] `RCTDevSettings` is a TurboModule: it conforms to `NativeDevSettingsSpec` 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 `NativeDevSettingsSpec` 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. Differential Revision: D113579870 --- .../React/CoreModules/RCTDevSettings.mm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTDevSettings.mm b/packages/react-native/React/CoreModules/RCTDevSettings.mm index cc4cb1c74e52..0698f4a93fb7 100644 --- a/packages/react-native/React/CoreModules/RCTDevSettings.mm +++ b/packages/react-native/React/CoreModules/RCTDevSettings.mm @@ -313,22 +313,22 @@ - (BOOL)isHotLoadingAvailable return NO; } -RCT_EXPORT_METHOD(reload) +- (void)reload { RCTTriggerReloadCommandListeners(@"Unknown From JS"); } -RCT_EXPORT_METHOD(reloadWithReason : (NSString *)reason) +- (void)reloadWithReason:(NSString *)reason { RCTTriggerReloadCommandListeners(reason); } -RCT_EXPORT_METHOD(onFastRefresh) +- (void)onFastRefresh { [self.bridge onFastRefresh]; } -RCT_EXPORT_METHOD(setIsShakeToShowDevMenuEnabled : (BOOL)enabled) +- (void)setIsShakeToShowDevMenuEnabled:(BOOL)enabled { [self _updateSettingWithValue:@(enabled) forKey:kRCTDevSettingShakeToShowDevMenu]; } @@ -338,7 +338,7 @@ - (BOOL)isShakeToShowDevMenuEnabled return _isShakeGestureEnabled && [[self settingForKey:kRCTDevSettingShakeToShowDevMenu] boolValue]; } -RCT_EXPORT_METHOD(setProfilingEnabled : (BOOL)enabled) +- (void)setProfilingEnabled:(BOOL)enabled { [self _updateSettingWithValue:@(enabled) forKey:kRCTDevSettingProfilingEnabled]; [self _profilingSettingDidChange]; @@ -368,7 +368,7 @@ - (void)_profilingSettingDidChange } } -RCT_EXPORT_METHOD(setHotLoadingEnabled : (BOOL)enabled) +- (void)setHotLoadingEnabled:(BOOL)enabled { if (self.isHotLoadingEnabled != enabled) { [self _updateSettingWithValue:@(enabled) forKey:kRCTDevSettingHotLoadingEnabled]; @@ -390,7 +390,7 @@ - (BOOL)isHotLoadingEnabled return [[self settingForKey:kRCTDevSettingHotLoadingEnabled] boolValue]; } -RCT_EXPORT_METHOD(toggleElementInspector) +- (void)toggleElementInspector { BOOL value = [[self settingForKey:kRCTDevSettingIsInspectorShown] boolValue]; [self _updateSettingWithValue:@(!value) forKey:kRCTDevSettingIsInspectorShown]; @@ -403,7 +403,7 @@ - (BOOL)isHotLoadingEnabled } } -RCT_EXPORT_METHOD(addMenuItem : (NSString *)title) +- (void)addMenuItem:(NSString *)title { __weak __typeof(self) weakSelf = self; [(RCTDevMenu *)[self.moduleRegistry moduleForName:"DevMenu"] @@ -494,7 +494,7 @@ - (void)setupHMRClientWithAdditionalBundleURL:(NSURL *)bundleURL } } -RCT_EXPORT_METHOD(openDebugger) +- (void)openDebugger { #if RCT_ENABLE_INSPECTOR [RCTInspectorDevServerHelper From dc6332ed6964fb6f00b9f275db821be3440de189 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 10/13] Drop RCT_EXPORT_METHOD from RCTDevToolsRuntimeSettingsModule TurboModule (#57683) Summary: Changelog: [Internal] `RCTDevToolsRuntimeSettingsModule` is a TurboModule: it conforms to `NativeReactDevToolsRuntimeSettingsModuleSpec` 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 `NativeReactDevToolsRuntimeSettingsModuleSpec` 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. Differential Revision: D113579881 --- .../React/CoreModules/RCTDevToolsRuntimeSettingsModule.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTDevToolsRuntimeSettingsModule.mm b/packages/react-native/React/CoreModules/RCTDevToolsRuntimeSettingsModule.mm index ba4e2559697a..5b5a986da14b 100644 --- a/packages/react-native/React/CoreModules/RCTDevToolsRuntimeSettingsModule.mm +++ b/packages/react-native/React/CoreModules/RCTDevToolsRuntimeSettingsModule.mm @@ -25,8 +25,7 @@ @interface RCTDevToolsRuntimeSettingsModule () Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 11/13] Drop RCT_EXPORT_METHOD from RCTExceptionsManager TurboModule (#57684) Summary: Changelog: [Internal] `RCTExceptionsManager` is a TurboModule: it conforms to `NativeExceptionsManagerSpec` 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 `NativeExceptionsManagerSpec` 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. Differential Revision: D113579875 --- .../React/CoreModules/RCTExceptionsManager.mm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTExceptionsManager.mm b/packages/react-native/React/CoreModules/RCTExceptionsManager.mm index cdaae3aee7f8..9b3b56c3371a 100644 --- a/packages/react-native/React/CoreModules/RCTExceptionsManager.mm +++ b/packages/react-native/React/CoreModules/RCTExceptionsManager.mm @@ -87,24 +87,22 @@ - (void)reportFatal:(NSString *)message } // TODO(T205456329): This method is deprecated in favour of reportException. Delete in v0.77 -RCT_EXPORT_METHOD( - reportSoftException : (NSString *)message stack : (NSArray *)stack exceptionId : (double) - exceptionId) +- (void)reportSoftException:(NSString *)message stack:(NSArray *)stack exceptionId:(double)exceptionId { [self reportSoft:message stack:stack exceptionId:exceptionId extraDataAsJSON:nil]; } // TODO(T205456329): This method is deprecated in favour of reportException. Delete in v0.77 -RCT_EXPORT_METHOD( - reportFatalException : (NSString *)message stack : (NSArray *)stack exceptionId : (double) - exceptionId) +- (void)reportFatalException:(NSString *)message stack:(NSArray *)stack exceptionId:(double)exceptionId { [self reportFatal:message stack:stack exceptionId:exceptionId extraDataAsJSON:nil]; } -RCT_EXPORT_METHOD(dismissRedbox) {} +- (void)dismissRedbox +{ +} -RCT_EXPORT_METHOD(reportException : (JS::NativeExceptionsManager::ExceptionData &)data) +- (void)reportException:(JS::NativeExceptionsManager::ExceptionData &)data { NSMutableDictionary *mutableErrorData = [NSMutableDictionary new]; mutableErrorData[@"message"] = data.message(); From d6495cb323ccb97842157dd06f7d6e785621314b Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 12/13] Drop RCT_EXPORT_METHOD from RCTI18nManager TurboModule (#57685) Summary: Changelog: [Internal] `RCTI18nManager` is a TurboModule: it conforms to `NativeI18nManagerSpec` 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 `NativeI18nManagerSpec` 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. Differential Revision: D113579882 --- packages/react-native/React/CoreModules/RCTI18nManager.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTI18nManager.mm b/packages/react-native/React/CoreModules/RCTI18nManager.mm index 7d3b9eaa11cf..e24c2e60ff64 100644 --- a/packages/react-native/React/CoreModules/RCTI18nManager.mm +++ b/packages/react-native/React/CoreModules/RCTI18nManager.mm @@ -26,17 +26,17 @@ + (BOOL)requiresMainQueueSetup return NO; } -RCT_EXPORT_METHOD(allowRTL : (BOOL)value) +- (void)allowRTL:(BOOL)value { [[RCTI18nUtil sharedInstance] allowRTL:value]; } -RCT_EXPORT_METHOD(forceRTL : (BOOL)value) +- (void)forceRTL:(BOOL)value { [[RCTI18nUtil sharedInstance] forceRTL:value]; } -RCT_EXPORT_METHOD(swapLeftAndRightInRTL : (BOOL)value) +- (void)swapLeftAndRightInRTL:(BOOL)value { [[RCTI18nUtil sharedInstance] swapLeftAndRightInRTL:value]; } From b6f9774b330bac034595f701944d6e3a1689cb82 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:36:37 -0700 Subject: [PATCH 13/13] Drop RCT_EXPORT_METHOD from RCTLogBox TurboModule (#57677) Summary: Changelog: [Internal] `RCTLogBox` is a TurboModule: it conforms to `NativeLogBoxSpec` 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 `NativeLogBoxSpec` 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. Differential Revision: D113579879 --- packages/react-native/React/CoreModules/RCTLogBox.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTLogBox.mm b/packages/react-native/React/CoreModules/RCTLogBox.mm index d9663afb29c4..7e8be47170dd 100644 --- a/packages/react-native/React/CoreModules/RCTLogBox.mm +++ b/packages/react-native/React/CoreModules/RCTLogBox.mm @@ -39,7 +39,7 @@ - (void)setSurfacePresenter:(id)surfacePresenter _bridgelessSurfacePresenter = surfacePresenter; } -RCT_EXPORT_METHOD(show) +- (void)show { if (RCTRedBoxGetEnabled()) { __weak RCTLogBox *weakSelf = self; @@ -63,7 +63,7 @@ - (void)setSurfacePresenter:(id)surfacePresenter } } -RCT_EXPORT_METHOD(hide) +- (void)hide { if (RCTRedBoxGetEnabled()) { __weak RCTLogBox *weakSelf = self;