react-native-auth0: React/RCTDefines.h file not found

After the recent release (1.4.0) I’m getting a build error on iOS claiming 'React/RCTDefines.h' file not found after doing a pod install. I noticed this: https://github.com/auth0/react-native-auth0/pull/192/files in the last PR and when I put it back locally (and run pod install) it seems to build again. It seems this causes issues in older versions of react native. Is the only solution to update RN or is there a way to make this backwards compatible?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 13
  • Comments: 15 (4 by maintainers)

Most upvoted comments

FYI what worked for me (for iOS, haven’t tried Android yet) was to:

  • remove pod 'A0Auth0', :path => '../node_modules/react-native-auth0' from Podfile
  • add node_modules/react-native-auth0/ios/A0Auth0.xcodeproj to Libraries in Xcode
  • manually link libA0Auth0.a in Build Phases

Using

  Xcode: 10.1
  react-native: 0.57.8
  react-native-cli: 2.0.1
  react-native-auth0: 1.4.0

I had a play with this, using the follow versions:

react-native-cli: 2.0.1
react-native: 0.59.3
Xcode 10.1
react-native-auth0: 1.4.0

I followed this guide as I wanted to understand pod usage: https://facebook.github.io/react-native/docs/integration-with-existing-apps.html (Swift Project)

I ran into RCTBridgeModule.h missing, looked at various “solutions”. However, simply adding the s.dependency "React" back into node_modules/react-native-auth0A0Auth0.podspec fixed this for me. So, I will add back to the Podfile.

@cocojoe, any timeline in mind for putting it back?

Hi, I have the same issue but I can find s.dependency "React" at the end of A0Auth0.podspec, any solution?

@cocojoe Sorry for the late response. Basically, as far as I can tell, the fix for issue https://github.com/auth0/react-native-auth0/issues/191 fixes newer versions of react native but breaks older ones. Just curious if anyone has suggestions for backward compatibility. Updating react native projects is still quite painful so I’m trying to defer for at least a little while longer.

Yes @cocojoe. I can confirm that adding this line back to the podspec file solves the issue: https://github.com/auth0/react-native-auth0/pull/192/files#diff-b783818a710ff92753f417048ea8213dL17

In a side note, it’s kind of confusing what you said that you aren’t officially supporting pod install, because the only thing that cmd react-native link react-native-auth0 is doing is adding this line to the Podfile:

    pod 'A0Auth0', :path => '../node_modules/react-native-auth0'

I can open a PR today to address this issue if you want