Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove RCTDeviceInfo notification center observers when invalidating #42005

Closed
wants to merge 1 commit into from

Conversation

gabrieldonadel
Copy link
Collaborator

Summary:

RCTDeviceInfo NSNotificationCenter observers never get removed, even after invaliding modules.

In scenarios where the RCTUserInterfaceStyleDidChangeNotification notification is manually posted after invaliding a bridge, the app will crash due to the interfaceFrameDidChange function being unable to get _exportedDimensions from the old (invalidated) bridge

Changelog:

[IOS][CHANGED] - Remove RCTDeviceInfo notification center observers when invalidating

Test Plan:

Invalidate a bridge and then post a RCTUserInterfaceStyleDidChangeNotification notification

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Dec 20, 2023
@gabrieldonadel
Copy link
Collaborator Author

Closing this in favor of #42396

@gabrieldonadel gabrieldonadel deleted the fix-device-info branch January 24, 2024 21:08
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. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants