Skip to content

Add warning when a module tries to invoke a method using the interop layer#50175

Closed
cipolleschi wants to merge 2 commits into
facebook:mainfrom
cipolleschi:export-D71561348
Closed

Add warning when a module tries to invoke a method using the interop layer#50175
cipolleschi wants to merge 2 commits into
facebook:mainfrom
cipolleschi:export-D71561348

Conversation

@cipolleschi
Copy link
Copy Markdown
Contributor

Summary:
This change logs warning in the RN Dev Tools and in the Xcode console when a legacy module is used through the interop layer.

The moduleName.methodName warning is logged only once per usage not to flood the users with Warnings.

Changelog:

[iOS][Added] - Add warnings when a legacy module is used in the Interop Layer.

Differential Revision: D71561348

Summary:
Pull Request resolved: facebook#49897

This change introduces the first warning for the New Architecture warning.

When modules are registered through the RCT_EXPORT_MODULE (or its variants) a warning is emitted.

Note: currently it is only emitted on the Xcode console.
I'm looking into ways to emit it also in the RN DevTools console.

## Changelog:
[iOS][Added] - Show warnings in the New Architecture when modules are loaded using RCT_EXPORT_MODULE

Differential Revision: D70789672
@facebook-github-bot facebook-github-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 Mar 20, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71561348

…layer (facebook#50175)

Summary:
Pull Request resolved: facebook#50175

This change logs warning in the RN Dev Tools and in the Xcode console when a legacy module is used through the interop layer.

The `moduleName.methodName` warning is logged only once per usage not to flood the users with Warnings.

## Changelog:
[iOS][Added] - Add warnings when a legacy module is used in the Interop Layer.

Reviewed By: cortinico

Differential Revision: D71561348
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71561348

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71561348

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 21, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 7b500b8.

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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants