react-native-gesture-handler: v1.5.0 iOS build fails with RN 0.59

fatal error: 'React/RCTRootContentView.h' file not found

#import <React/RCTRootContentView.h>

v1.4.1 built fine with RN 0.59 but v1.5.0 fails in the Xcode build. It appears to be related to this PR updating the project to RN 0.61.

Perhaps you could do something like this for backwards compatibility?

#if __has_include(<React/RCTRootContentView.h>)
#import <React/RCTRootContentView.h>
#endif

...

    if ([parent isKindOfClass:[RCTRootView class]]) {
#if __has_include(<React/RCTRootContentView.h>)
        [((RCTRootContentView*)rootContentView).touchHandler cancel];
#else
        [(RCTRootView*)parent cancelTouches];
#endif
    }

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 49
  • Comments: 38 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Replace #import <React/RCTRootContentView.h> with #import “RCTRootContentView.h”

Problem Resolved

Got the same error using 1.5.0 on RN 0.59.9

To temporarily downgrade put this in your package.json:

"react-native-gesture-handler": "~1.4.0",

And reinstall your dependencies

Is this going to be fixed in the lib or do we have to stay on 1.4.x for RN < 0.60?

i resolve this issue by downgrading to 1.3. and now im not using cocoapods creating app without cocoapods… if you need help please tell me send you details.

Replace #import <React/RCTRootContentView.h> with #import “RCTRootContentView.h”

Problem Resolved

is there a more permanent fix?

Same problem with RN 0.61.1.

Got the same error using 1.5.0 on RN 0.59.9

To temporarily downgrade put this in your package.json:

"react-native-gesture-handler": "~1.4.0",

And reinstall your dependencies

1.4.0 & RN 0.59.9 do not work on Android due to androidx. Had to downgrade back to 1.1.3.

facing same issue on RN 0.59.0 & react-native-gesture-handler 1.5.0… is there any issue with

Replace #import <React/RCTRootContentView.h> with #import “RCTRootContentView.h”

Problem Resolved

@kmagiera could this be solved to help people in react native 0.59 ?