Provides access to a database that can be queried through a WebSQL-like API (https://www.w3.org/TR/webdatabase/). The database is persisted across restarts of your app.
For managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release.
For bare React Native projects, you must ensure that you have installed and configured the expo
package before continuing.
npx expo install expo-sqlite
No additional set up necessary.
Run npx pod-install
after installing the npm package.
Contributions are very welcome! Please refer to guidelines described in the contributing guide.
To update bundled SQLite3 and SQLCipher source code under vendor/
, you can use the helper scripts:
# You should clone expo/expo git repository first
$ cd packages/expo-sqlite
# Download and build sqlite3.[ch]
# For example, to use sqlite 3.45.3 and sqlcipher 4.6.0
$ ./scripts/prepare_sqlite.ts vendor/sqlite3 3.45.3
$ ./scripts/prepare_sqlite.ts vendor/sqlcipher 4.6.0 --sqlcipher
# Replace sqlite3 symbols to prevent conflict with iOS system sqlite3
$ ./scripts/replace_symbols.ts vendor/sqlite3
$ ./scripts/replace_symbols.ts vendor/sqlcipher