Skip to content

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

Description

@slvvn

Description

Building react-native-gesture-handler 3.0.0 on tvOS fails because RNNativeViewHandler.mm references UISwitch, which is not available on tvOS.

Steps to reproduce

  1. Create or use an Expo / React Native app targeting tvOS (with react-native-tvos and EXPO_TV=1)
  2. Install react-native-gesture-handler@3.0.0
  3. Build for tvOS

Expected behavior

The library builds on tvOS.

Actual behavior

Xcode compile error:

apple/Handlers/RNNativeViewHandler.mm:148:30: error: 'UISwitch' is unavailable: not available on tvOS
    if ([view isKindOfClass:[UISwitch class]]) {
                             ^

Environment

  • react-native-gesture-handler: 3.0.0
  • react-native: react-native-tvos 0.85

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions