Realm-js: Unable to build Realm with React Native 0.61.2

Created on 11 Oct 2019  路  4Comments  路  Source: realm/realm-js

Does RealmJS currently support React Native 0.60 and above?

Unable to build ios project with realm 3.2.0 integrated on React-Native v0.61.2.

Error:
node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:27:9: 'React/RCTBridge+Private.h' file not found

Environment:
React Native: 0.61.2
React: 16.9.0
Realm-js: 3.2.0

Goals

The project builds successfully and runs on an iOS device without any Realm DB issues.

Expected Results

Existing app functions without any errors with the realm DB.

Actual Results

The app crashed at the launch on the iPad. Below is the error:
React/RCTBridge+Private.h file not found in node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:27:9

Steps to Reproduce

  1. Create a new app with react-native init RNDeamo
  2. npm install --save [email protected]
  3. react-native link realm --platforms ios. Run "pod install"
  4. Open RNDemo.xcworkspace and clean the project. Then build the app.

Build fails with the above-mentioned error.

Version of Realm and Tooling

  • Realm JS SDK Version: 3.2.0
  • Node or React Native: React Native 0.61.2
  • Client OS & Version: macOS Mojave
  • Which debugger for React Native: None
O-Community T-Enhancement

Most helpful comment

  • drop RealmJS.xcodeproj to project
  • add $(SRCROOT)/../../../ios/Pods/Headers/Public recursive in RealmReact.xcodeproj Header Search Paths

All 4 comments

image

Please take a look at #2554. It is not completely done yet but you are welcome to help us iterate faster.

  • drop RealmJS.xcodeproj to project
  • add $(SRCROOT)/../../../ios/Pods/Headers/Public recursive in RealmReact.xcodeproj Header Search Paths
Was this page helpful?
0 / 5 - 0 ratings