Skip to content

Commit

Permalink
Fix minimize/restore crash (facebook#46023)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#46023

Minimizing and restoring a Mac Catalyst app causes an `interfaceOrientationDidChange` which causes a downstream crash on `application.delegate.window`.

There doesn't seem to be a clean way to get if an app is fullscreen in Mac Catalyst, so just no-oping for now.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D61253706

fbshipit-source-id: 73d260366adcc74e88f43f256cc5aff8a6e3ef71
  • Loading branch information
sbuggay authored and facebook-github-bot committed Aug 14, 2024
1 parent 94407f5 commit 9bc32a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native/React/CoreModules/RCTDeviceInfo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ - (void)interfaceOrientationDidChange

- (void)_interfaceOrientationDidChange
{
#if TARGET_OS_IOS
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
UIApplication *application = RCTSharedApplication();
UIInterfaceOrientation nextOrientation = RCTKeyWindow().windowScene.interfaceOrientation;

Expand Down

0 comments on commit 9bc32a0

Please sign in to comment.