examples/ionic/README.md
This is a hero list app that shows how to use RxDB inside of an Ionic app that runs in the browser and, via Capacitor, on Android and iOS.
The app uses:
cd examples/ionicnpm installnpm run devThe native projects are not checked in, so you have to create them once:
npm run build
npm run cap:add:android # or: npm run cap:add:ios
Afterwards you can open the project in Android Studio or Xcode:
npm run cap:open:android # or: npm run cap:open:ios
Both scripts run the web build and npx cap sync before opening the native IDE.
For the GitHub CI this example installs the local RxDB build (rxdb-local.tgz) which is created by the preinstall script. In your own app you install rxdb from npm instead:
npm install rxdb rxjs
The localstorage RxStorage is used here because it needs no native plugin and works everywhere. When you store many documents on a mobile device, you can switch to the SQLite RxStorage which stores the data outside of the webview. Switching storages is a configuration change, not a rewrite, so only the storage field in src/app/services/database.service.ts has to be changed.