react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

v1.5.0 iOS build fails with RN 0.59

Open geraintwhite opened this issue 7 years ago • 38 comments

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
    }

geraintwhite avatar Oct 30 '19 10:10 geraintwhite

Same issue here on RN 0.60. The RCTRootContentView.h file seems to not be available on RN 0.60, so 1.5.0 was indeed a breaking change for iOS.

rye avatar Oct 30 '19 13:10 rye

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

Cyberfolks avatar Oct 31 '19 21:10 Cyberfolks

I am having the same issue. I tried Product -> Clean Build Folder, but that did not help.

nestedJSObject avatar Nov 01 '19 02:11 nestedJSObject

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.

Cyberfolks avatar Nov 01 '19 15:11 Cyberfolks

how do you downgrade to 1.3? pls send me the details! thanks!

SimonTsh avatar Nov 01 '19 15:11 SimonTsh

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

GunnarAK avatar Nov 01 '19 18:11 GunnarAK

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

Thank you. I can run normally after I change the version.

secretary010 avatar Nov 04 '19 10:11 secretary010

Same problem with RN 0.61.1.

co-de avatar Nov 04 '19 12:11 co-de

resolved, thks @GunnarAK

mx-dever avatar Nov 08 '19 11:11 mx-dever

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.

rafalzawadzki avatar Nov 12 '19 16:11 rafalzawadzki

Replace #import <React/RCTRootContentView.h> with #import "RCTRootContentView.h"

Problem Resolved

Ashutosh8127 avatar Nov 13 '19 08:11 Ashutosh8127

Replace #import <React/RCTRootContentView.h> with #import "RCTRootContentView.h"

My RN project decided to stop working without any reason. Been stuck with this error since yesterday, tried many different things and thanks to yours it worked.

Thanks @Ashutosh8127 !!

snafx avatar Nov 13 '19 08:11 snafx

Replace #import <React/RCTRootContentView.h> with #import "RCTRootContentView.h"

Problem Resolved

the problem was solved, thanks

BlueBash-Cloud avatar Nov 14 '19 02:11 BlueBash-Cloud

@Ashutosh8127 : Can you share path ?

hussainhspl avatar Nov 14 '19 09:11 hussainhspl

this stack overflow comment solved my Problem https://stackoverflow.com/a/58833342/11394425

hussainhspl avatar Nov 14 '19 09:11 hussainhspl

Replace #import <React/RCTRootContentView.h> with #import "RCTRootContentView.h"

Problem Resolved

thank youuu.....u save my day @Ashutosh8127

herisusantuy avatar Nov 14 '19 18:11 herisusantuy

thank u @Ashutosh8127

zulqarnain26 avatar Nov 22 '19 06:11 zulqarnain26

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

geraintwhite avatar Nov 22 '19 08:11 geraintwhite

+1

jianxinzhoutiti avatar Nov 25 '19 05:11 jianxinzhoutiti

thanks @Ashutosh8127

erwinwahyura avatar Dec 02 '19 16:12 erwinwahyura