Skip to content

Drop RCT_EXPORT_METHOD from RCTAccessibilityManager TurboModule#57672

Open
christophpurrer wants to merge 2 commits into
react:mainfrom
christophpurrer:export-D113579886
Open

Drop RCT_EXPORT_METHOD from RCTAccessibilityManager TurboModule#57672
christophpurrer wants to merge 2 commits into
react:mainfrom
christophpurrer:export-D113579886

Conversation

@christophpurrer

Copy link
Copy Markdown
Contributor

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

Summary:

Changelog: [Internal]

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

`setString:` and `getString:reject:` are async-void methods whose parameters are
all concrete types (`NSString *`, promise blocks) — none is a generic `id`
requiring `RCTConvert` coercion — so the macro is not functionally required.
Convert both to plain ObjC method declarations; conformance to the codegen'd
`NativeClipboardSpec` protocol keeps compiler-enforced signature parity.

This is a signature-only refactor with no change to the JS-facing API (the codegen
spec). The macro is intentionally retained elsewhere: sync methods, methods with
`id` params relying on `RCTConvert`, and modules reachable via the legacy
bridge/interop layer still need it.

Differential Revision: D113568495
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
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 24, 2026
@meta-codesync

meta-codesync Bot commented Jul 24, 2026

Copy link
Copy Markdown

@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113579886.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant