Skip to content

Fix Crash when rendering Switch component#53393

Closed
cipolleschi wants to merge 1 commit into
facebook:mainfrom
cipolleschi:export-D80702245
Closed

Fix Crash when rendering Switch component#53393
cipolleschi wants to merge 1 commit into
facebook:mainfrom
cipolleschi:export-D80702245

Conversation

@cipolleschi
Copy link
Copy Markdown
Contributor

Summary:
When implementing the changes for the Switch component for iOS 26, I didn't realize that the code in RCTIntance.mm was running behind a feature flag.
This means that all the users not in the experiment where the feature flag is turned on will experience a crash as soon as they navigate to a React Native screen that contains a Switch.

This change fixes the problem by adding a jump to the right queue and it also fixes a measurement issue with the Switch.

Changelog:

[iOS][Fixed] - Fixed a crash when rendering the Switch component

Differential Revision: D80702245

Summary:
When implementing the changes for the Switch component for iOS 26, I didn't realize that the code in [`RCTIntance.mm`](https://www.internalfb.com/code/fbsource/[a54514baccf4e1f828ef46af8180555754c405d8]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm?lines=344-375) was running behind a feature flag.
This means that all the users not in the experiment where the feature flag is turned on will experience a crash as soon as they navigate to a React Native screen that contains a Switch.

This change fixes the problem by adding a jump to the right queue and it also fixes a measurement issue with the Switch.

## Changelog:
[iOS][Fixed] - Fixed a crash when rendering the Switch component

Differential Revision: D80702245
@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 Aug 21, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 28275a0.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @cipolleschi in 28275a0

When will my fix make it into a release? | How to file a pick request?

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.

3 participants