From dd8eb8ad6f0594f8e5751751d676382a6b247c5d Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 01/10] 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 2f11b6911b12771ee34c560a434e99d4d26baf75 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 02/10] 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 b4e2c6deb326a1cd01015288a822472f3de95434 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 03/10] 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 022d1ea2816ddba7ce3d34dabd9dba4d27d21824 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 04/10] 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 a661461342a3e7ca43956ee71eef98419f703633 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 05/10] 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 6844e979f01b8d7dbde537194222b1ea4c570a85 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 06/10] 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 b6a345b749aac498f67a6420c5205d078c128974 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 07/10] 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 7642cc7bd0af2dbb5f2e05b41e7ce628d49566ca Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 08/10] 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 691fd4bc16b21268c7f07c23f0c8389ff771f5a2 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 09/10] 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 a9ed439e958ab3c6ebe24e82523293b11ce47556 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 24 Jul 2026 18:37:47 -0700 Subject: [PATCH 10/10] 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 ()