I'm trying to use Realm in my app, because I only have to store data in a local database on the device, but when I do expo start
and open the app on my phone, I get the following:
Error: Missing Realm constructor. Did you run "pod install"?
Which only seems to be a problem in iOS. If I do the following:
cd ios && pod install && cd ..
I get another error, which seems to be with Installing glog (0.3.5)
, that displays a whole bash file, the gist of it being:
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
./Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-04b94/missing: Unknown `--is-lightweight' option
Try `./Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-04b94/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `./Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-04b94':
configure: error: C compiler cannot create executables
So it feels like I'm stuck in a loop.
To me there are 3 options:
- I don't need to support iOS, so the most apparent solution would be to exclude that from the build. I'm using flexbox anyway, next to other Android only solutions
- Get Realm to work with Expo, though I'm not sure how a database like that would work with a temporary version of the app
- Use another storage solution. That would be the absolute last option, because I like the way I can query data with it and still store the data locally on the device
I could also eject from Expo and use vanilla React Native instead, but I don't know how I can test real time on my device (without adding a whole lot of bloat or adding yet another learning curve anyway).
Any suggestions?