Skip to content

Commit b04733e

Browse files
Drop RCT_EXPORT_METHOD from RCTI18nManager TurboModule
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
1 parent 1ff33be commit b04733e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ + (BOOL)requiresMainQueueSetup
2626
return NO;
2727
}
2828

29-
RCT_EXPORT_METHOD(allowRTL : (BOOL)value)
29+
- (void)allowRTL:(BOOL)value
3030
{
3131
[[RCTI18nUtil sharedInstance] allowRTL:value];
3232
}
3333

34-
RCT_EXPORT_METHOD(forceRTL : (BOOL)value)
34+
- (void)forceRTL:(BOOL)value
3535
{
3636
[[RCTI18nUtil sharedInstance] forceRTL:value];
3737
}
3838

39-
RCT_EXPORT_METHOD(swapLeftAndRightInRTL : (BOOL)value)
39+
- (void)swapLeftAndRightInRTL:(BOOL)value
4040
{
4141
[[RCTI18nUtil sharedInstance] swapLeftAndRightInRTL:value];
4242
}

0 commit comments

Comments
 (0)