Skip to content

fix: visionOS compiler errors#3018

Open
joannaquu wants to merge 1 commit into
microsoft:mainfrom
joannaquu:joannaqu/fix-vision
Open

fix: visionOS compiler errors#3018
joannaquu wants to merge 1 commit into
microsoft:mainfrom
joannaquu:joannaqu/fix-vision

Conversation

@joannaquu

Copy link
Copy Markdown

Summary:

Fixing visionOS build

  • RCTUITextView and RCTUITextField.mm's setDisableKeyboardShortcuts has some code behind an iOS ifdef. This causes the complier to complain that we never set the ivar. Move the ivar.
  • interfaceOrientationDidChange is behind an iOS ifdef. The usage of it should be too

Test Plan:

Local build

@joannaquu joannaquu requested a review from a team as a code owner July 10, 2026 22:41
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@Saadnajmi

Copy link
Copy Markdown
Collaborator

/backport 0.81-stable

Comment on lines -87 to 112
#if !TARGET_OS_OSX // [macOS]
#if TARGET_OS_IOS // [macOS] [visionOS]
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceOrientationDidChange)
name:UIApplicationDidBecomeActiveNotification
object:nil];
#endif // [macOS]

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceFrameDidChange)
name:RCTUserInterfaceStyleDidChangeNotification
object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceFrameDidChange)
name:UIApplicationDidBecomeActiveNotification
object:nil];

#if TARGET_OS_IOS

_currentInterfaceOrientation = RCTKeyWindow().windowScene.interfaceOrientation;

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceFrameDidChange)
name:UIDeviceOrientationDidChangeNotification
object:nil];
#endif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine?

@microsoft-react-native-sdk

Copy link
Copy Markdown

Backport results

  • ⚠️ 0.81-stable : branch does not exist

@Saadnajmi Saadnajmi changed the title Fix visionOS build fix: visionOS compiler errors Jul 11, 2026
@Saadnajmi

Copy link
Copy Markdown
Collaborator

/backport 0.81-stable

@microsoft-react-native-sdk

Copy link
Copy Markdown

Backport results

  • 0.81-stable: cherry-pick conflicts (manual backport needed)

@Saadnajmi

Copy link
Copy Markdown
Collaborator

@copilot backport to 0.81-stable

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants