Closed amirduran closed 4 years ago
It seems like the bug is on this line.
On Android device sqlite
is object that has attribute openDatabase
which is a function. On iOS device sqlite
is an object which has an object SQLite
and that object has a function openDatabase
.
So if I change the line 25 with the following one on the iOS device, it works normally.
return sqlite.SQLite.openDatabase(openOpts.name, openOpts.version, openOpts.description, openOpts.size, null, onError)
Is this a bug or I have misconfigured something?
I don't know how expo-sqlite
works because I made it to work with react-native-sqlite-2 as the README suggests.
Ok I, just saw that line in Readme. I decided to go away from SQLite, PouchDB because of the issues in RN. Thx for your comment.
Hi @craftzdog,
I have issue with PouchDb react native sqlite adapter when using it on iOS device. I'm developing small React Native application for my SmartHome and using PouchDB to save some data locally on the phone.
The code works good when executing it on the Android device, but on the iOS device I get the following error:
I'm using expo project together with
"expo-sqlite": "^8.0.0"
.When I console log the last line or
new PouchDB(...)
object here is what I get:Any idea what might be the problem?