Skip to content

Commit 1ab3cf4

Browse files
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
1 parent 4bb939f commit 1ab3cf4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native/React/CoreModules/RCTAlertManager.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ - (void)invalidate
6565
* The key from the `buttons` dictionary is passed back in the callback on click.
6666
* Buttons are displayed in the order they are specified.
6767
*/
68-
RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback : (RCTResponseSenderBlock)callback)
68+
- (void)alertWithArgs:(JS::NativeAlertManager::Args &)args callback:(RCTResponseSenderBlock)callback
6969
{
7070
NSString *title = [RCTConvert NSString:args.title()];
7171
NSString *message = [RCTConvert NSString:args.message()];

0 commit comments

Comments
 (0)