Skip to content

Add DEBUG guard and production error logging to UnimplementedView - #57980

Closed
alanleedev wants to merge 1 commit into
react:mainfrom
alanleedev:export-D101001824
Closed

Add DEBUG guard and production error logging to UnimplementedView#57980
alanleedev wants to merge 1 commit into
react:mainfrom
alanleedev:export-D101001824

Conversation

@alanleedev

Copy link
Copy Markdown
Contributor

Summary:
Two changes to UnimplementedView on both iOS and Android:

  1. iOS: Add #if DEBUG guard — the red overlay and error text in RCTUnimplementedViewComponentView and RCTUnimplementedNativeComponentView were shown in release builds (unlike Android which already had ReactBuildConfig.DEBUG guards). Users saw a red semi-transparent overlay with the component name. Now matches Android behavior — release users see nothing.

  2. Both platforms: Add production error loggingRCTLogError on iOS and ReactSoftExceptionLogger on Android, outside the DEBUG guard. These fire in all builds including production, so missing native component registrations are reported to error dashboards instead of being completely silent.

Files changed:

  • RCTUnimplementedViewComponentView.mm — primary Fabric fallback view (iOS)
  • RCTUnimplementedNativeComponentView.mm — UnimplementedNativeView component (iOS)
  • ReactUnimplementedView.kt — Android equivalent

Reviewed By: javache

Differential Revision: D101001824

Summary:
Two changes to UnimplementedView on both iOS and Android:
1. **iOS: Add `#if DEBUG` guard** — the red overlay and error text in `RCTUnimplementedViewComponentView` and `RCTUnimplementedNativeComponentView` were shown in release builds (unlike Android which already had `ReactBuildConfig.DEBUG` guards). Users saw a red semi-transparent overlay with the component name. Now matches Android behavior — release users see nothing.
2. **Both platforms: Add production error logging** — `RCTLogError` on iOS and `ReactSoftExceptionLogger` on Android, outside the DEBUG guard. These fire in all builds including production, so missing native component registrations are reported to error dashboards instead of being completely silent.
Files changed:
- `RCTUnimplementedViewComponentView.mm` — primary Fabric fallback view (iOS)
- `RCTUnimplementedNativeComponentView.mm` — UnimplementedNativeView component (iOS)
- `ReactUnimplementedView.kt` — Android equivalent
---
Reviewed By: javache
Differential Revision: D101001824
@meta-clameta-claBot 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 Aug 17, 2026
@meta-codesync

Copy link
Copy Markdown

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

@meta-codesyncmeta-codesyncBot added the Merged This PR has been merged. label Aug 20, 2026
@meta-codesync

Copy link
Copy Markdown

This pull request has been merged in ef28a2c.

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

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@alanleedev