realm-js: iOS - Missing Realm constructor - please ensure RealmReact framework is included!
When I run I get error (red screen) on iOS emulator
Missing Realm constructor - please ensure RealmReact framework is included!
'use strict'
import Realm from 'realm'
{...}
export default new Realm({schema: [WeatherProperty, WeatherStation, WeatherCurrent, WeatherDetail, WeatherTemperature, WeatherTemperatureData]})
Note that I am not getting any error in Android.
My dependencies :
"dependencies": {
"react": "^0.14.7",
"react-native": "^0.22.2",
"react-native-router-flux": "aksonov/react-native-router-flux#dcc7558",
"react-native-viewpager": "bosung90/react-native-viewpager#db525c8",
"react-redux": "^4.4.1",
"realm": "^0.11.1",
"redux": "^3.3.1"
},
"devDependencies": {
"redux-devtools": "^3.1.1"
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 39 (7 by maintainers)
I fix it just by adding this two lines in MainApplication.java
here’s a solution that worked for me on el capitan in the simulator:
buildfolder (note: you won’t see this build folder in atom, so just right clickiosand clickopen in finder)buildfolder (just move to trash and keep trash around in case you’re worried)react-native run-iosto rebuild the whole thingit appears when you link new modules, you have to rebuild the build to include it.
@enu-kuro
npm install -g rnpmrnpm link realmEverything works good when I build for my iPhone but I get the “Missing Realm constructor - pl…” when I run it in the simulator. Can anyone help with this?
“react”: “15.2.1”, “react-native”: “0.31.0”, “realm”: “^0.14.3”
This issue has presented itself for v47 & v48 on iOS only.
Still not working on iOS 😦 , Does anyone know how to solve this? “react”: “15.3.0”, “react-native”: “0.32.0”, “realm”: “^0.13.2”
I’ve also tried realm ‘0.12.0’, ‘0.14.0’, ‘0.14.3’, Those are not working…
PS: Android is fine.
Thanks @Yhozen, it worked for me.
Me I have the libRealmReact.a but still the same problem … any idea can be the problem ?