JavaScript

      +

      If you are building mobile or desktop applications using web technologies such as JavaScript/HTML/CSS, here are some options for using Couchbase Lite as an embedded database within your app.

      Cordova/PhoneGap

      Supported Plugin

      Ionic offers a fully supported Offline Storage Plugin that is powered by Couchbase Lite Enterprise Edition. The plugin exposes a JavaScript API that has full feature-parity with the underlying native API layer. The Ionic native plugin leverages the Cordova plugin to access Couchbase Lite’s native functionality on iOS and Android. This means that with Ionic’s native plugin, you can build hybrid apps using Cordova/PhoneGap for iOS and Android platforms. If you do not have access to the plugin, please contact your Accounts team.

      Build your own

      You can also build your own Cordova plugin on top of Couchbase Lite’s native API for iOS and Android. We have a couple of tutorials that describe how you can build your own plugin for Android and iOS respectively. You can use the samples as a starting point and expand it to suit your application requirements. As described in the tutorials, it is recommended that your plugin implements a subset of native APIs that is relevant to your application.

      Ionic

      Supported Plugin

      Ionic offers a fully supported Offline Storage Plugin that is powered by Couchbase Lite Enterprise Edition. If you are developing cross-platform apps in Ionic, you can use Ionic’s native plugin to access Couchbase Lite’s native functionality on iOS and Android. The plugin exposes a JavaScript API that has full feature-parity with the underlying native API layer. The plugin works with Cordova and is compatible with Capacitor, Ionic’s new app runtime. If you do not have access to the plugin, please contact your Accounts team.

      Build your own

      You can build your own Cordova plugin on top of Couchbase Lite’s native API for iOS and Android. The Cordova plugin is independent of the application’s UI layer and can be used to access native functionality from within your Ionic apps. We have a couple of tutorials that describe how you can build your own plugin for Android and iOS respectively. You can use the samples as a starting point and expand it to suit your application requirements. As described in the tutorials, it is recommended that your plugin implement a subset of native APIs that is relevant to your application.

      React Native

      Build your own

      React Native Modules make it easy to access native platform functionality from within your JavaScript based React Native apps. You can leverage this to build your own React Native plugin on top of Couchbase Lite’s native API for iOS and Android. We have a couple of tutorials that describe how you can build your plugin for Android and iOS respectively. You can use the samples as a starting point and expand it to suit your application requirements. As described in the tutorials, it is recommended that your plugin implement a subset of native APIs that is relevant to your application.

      Electron

      Supported Plugin

      Ionic offers a fully supported Offline Storage Plugin that is powered by Couchbase Lite Enterprise Edition. This plugin can be used to build cross-platform desktop apps using web technologies such as JavaScript/HTML/CCS powered by Electron. The plugin exposes a JavaScript API that has full feature-parity with the underlying native API layer.

      Build your own

      You can develop your own Electron.js wrapper on top of Couchbase Lite’s .NET API.