React-native-gesture-handler: Latest release (1.9.0) breaks build

Created on 23 Nov 2020  路  12Comments  路  Source: software-mansion/react-native-gesture-handler

Description

When running npx react-native run-ios the build fails with the following errors:

/Users/xxx/MyApp/node_modules/react-native-gesture-handler/ios/Handlers/RNPanHandler.m:212:18:
error: property 'allowedScrollTypesMask' not found on object of type 'RNBetterPanGestureRecognizer *'
      recognizer.allowedScrollTypesMask = UIScrollTypeMaskAll;
                 ^
/Users/xxx/MyApp/node_modules/react-native-gesture-handler/ios/Handlers/RNPanHandler.m:212:43:
error: use of undeclared identifier 'UIScrollTypeMaskAll'
      recognizer.allowedScrollTypesMask = UIScrollTypeMaskAll;

Downgrading to 1.8.0 solves the issue.

Package versions

  • React: 16.13.1
  • React Native: 0.63.2
  • React Native Gesture Handler: 1.9.0
Build or config issue

Most helpful comment

Using an older version of Xcode - 11.3.1, I can confirm I had to use version 1.8.0 (not 1.9.0) to avoid this error.

All 12 comments

What's your Xcode version? This probably comes from the #1128 PR, which bumped the minimal iOS version to 13 (requiring Xcode 11 to build).

yes I can confirm this as well Im running

React: 16.13.1
React Native: 0.63.3
React Native Gesture Handler: 1.9.0
XCode: 11.3.1
iOS simulator device version: 13.3.1

Downgraded back to 1.8.0 immediately works again

Same here: Xcode 11.3.1, simulator iOS version 13.3.

Could you try updating Xcode to the 11.4? Looks like allowedScrollTypesMask attribute is supported since 13.4+ iOS SDK which is included in the 11.4 Xcode release.

11.4 was released in March (8 months ago) so I'm closing this as a configuration issue.

Can confirm that this works in Xcode 12.2! :tada:

i comment during development this part at RNPanHandler.m and build works:

  if (@available(iOS 13.4, *)) {
    bool enableTrackpadTwoFingerGesture = [RCTConvert BOOL:config[@"enableTrackpadTwoFingerGesture"]];
    if(enableTrackpadTwoFingerGesture){
      recognizer.allowedScrollTypesMask = UIScrollTypeMaskAll;
    }
}

and my problem with reanimated 2)

[email protected] did NOT work for me. However,

[email protected] worked.
XCode: 10.1, Simulator: 12.1
React-native: 0.63.4
React: 16.13.1

@AIsokjonov could you please provide more information? What exactly doesn't work for you?

Using an older version of Xcode - 11.3.1, I can confirm I had to use version 1.8.0 (not 1.9.0) to avoid this error.

@jakub-gonet cannot update to 11.4 because latest is 11.3.1 on Mojave :D

@Stas-Buzunko I am locked to Mojave as well. Just needs to be wrapped in a conditional compile statement.

https://github.com/software-mansion/react-native-gesture-handler/pull/1301

Using an older version of Xcode - 11.3.1, I can confirm I had to use version 1.8.0 (not 1.9.0) to avoid this error.

SPENT 5 hours pulling my hair out thinking it was a mistake on my end after updating from react navigation 4 to 5... Im using RN Gesture Handler 1.8.0 and its working. 1.9.0 does not build! using Xcode version 11.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexthebake picture alexthebake  路  3Comments

jacobrosenskold picture jacobrosenskold  路  3Comments

enahum picture enahum  路  4Comments

brunolemos picture brunolemos  路  3Comments

rt2zz picture rt2zz  路  4Comments