Skip to content

Commit 40c5e6b

Browse files
okwasniewskifacebook-github-bot
authored andcommitted
fix: declare supportedInterfaceOrientations only on iOS (facebook#46512)
Summary: This PR adds an ifdef to declare `supportedInterfaceOrientations` only on iOS as this property does not affect other platforms causing a build issue. ## Changelog: [IOS] [ADDED] - declare supportedInterfaceOrientations only on iOS Pull Request resolved: facebook#46512 Test Plan: CI Green Reviewed By: christophpurrer Differential Revision: D62754746 Pulled By: javache fbshipit-source-id: e2ca5d96cba87e611c48a87f10bf7831e9051646
1 parent e8dd036 commit 40c5e6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ - (BOOL)prefersStatusBarHidden
5858
return [RCTUIStatusBarManager() isStatusBarHidden];
5959
}
6060

61-
#if RCT_DEV
61+
#if RCT_DEV && TARGET_OS_IOS
6262
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
6363
{
6464
UIInterfaceOrientationMask appSupportedOrientationsMask =

packages/react-native/React/Views/RCTModalHostViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ - (BOOL)prefersStatusBarHidden
5050
return _preferredStatusBarHidden;
5151
}
5252

53-
#if RCT_DEV
53+
#if RCT_DEV && TARGET_OS_IOS
5454
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
5555
{
5656
UIInterfaceOrientationMask appSupportedOrientationsMask =

0 commit comments

Comments
 (0)