Skip to content

[tvOS] Fix build error - #4228

Merged
m-bert merged 1 commit into
mainfrom
@mbert/fix-tvos-build
Jun 3, 2026
Merged

[tvOS] Fix build error#4228
m-bert merged 1 commit into
mainfrom
@mbert/fix-tvos-build

Conversation

@m-bert

@m-bert m-bert commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes build on tvOS by omitting check for UISwitch

Fixes #4223

Test plan

Add Gesture Handler to tvOS app and check build

Copilot AI review requested due to automatic review settings June 2, 2026 13:30
@m-bert
m-bert requested a review from j-piasecki June 2, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a tvOS build error by guarding the UISwitch-specific branch in RNNativeViewHandler with #if !TARGET_OS_TV, since UISwitch is unavailable on tvOS.

Changes:

  • Wrap the UISwitch isKindOfClass check and its handler binding in #if !TARGET_OS_TV / #endif.
  • Restructure the else branch so the non-switch code path is still taken on tvOS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@m-bert
m-bert merged commit fa2a561 into main Jun 3, 2026
4 checks passed
@m-bert
m-bert deleted the @mbert/fix-tvos-build branch June 3, 2026 07:33
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.

v3.0.0 fails to build on tvOS: UISwitch is unavailable in RNNativeViewHandler.mm

3 participants