@couchbase/couchbase-lite-react-native
v1.1.0
Published
Couchbase Lite Enterprise for React Native
Readme
React Native SDK for Couchbase Lite Enterprise
Official React Native bindings for Couchbase Lite Enterprise on iOS and Android. Use this SDK in React Native and Expo apps that need offline-first sync, local NoSQL storage, and enterprise replication.
Enterprise supported. This module is officially supported by Couchbase as part of the Couchbase Lite Enterprise platform.
Requirements
| Requirement | Details |
|---|---|
| React Native | >= 0.76 with New Architecture enabled |
| Expo | SDK 52+ with "newArchEnabled": true |
| React | >= 18.3.0 |
v1.1.0 requires the React Native New Architecture. The native modules are TurboModules generated via codegen; they do not run on the legacy bridge. Apps without New Architecture enabled will crash at runtime with:
TurboModuleRegistry.getEnforcing('CblDatabase') could not be foundIf your app is already on the New Architecture, upgrading is typically a version bump and rebuild. No Couchbase Lite API calls changed. If not, complete the React Native New Architecture migration first.
Installation
Full setup (native dependencies, Expo config, licensing) is documented at cbl-reactnative.dev → Install.
npm install @couchbase/couchbase-lite-react-nativeThen follow the platform-specific steps in the docs for iOS (pod install) and Android.
Upgrading to 1.1.0
Before upgrading from <= 1.0.x, review the full 1.1.0 release notes. Summary:
- New Architecture required: RN 0.76+ / Expo SDK 52+ with
newArchEnabled: true. pinnedServerCertificateis now enforced: a configured cert that was silently ignored in<= 1.0.1is now applied. Verify your pinned certificate is current or replication will fail.- Stricter replicator config validation: keys such as
acceptSelfSignedCerts,autoPurgeEnabled,heartbeat,maxAttempts, andmaxAttemptWaitTimemust be present and correctly typed. - TypeScript:
Collection.getDocument()/document()now returnDocument | undefined. Add a guard under strict mode.
const doc = await collection.getDocument(id);
if (doc) { /* ... */ }Documentation
- Getting started & API reference: cbl-reactnative.dev
Contributing
See CONTRIBUTING.md for development requirements, project structure, build instructions, and the pull-request workflow.
Support
This module is officially supported by Couchbase as part of the Couchbase Lite Enterprise platform.
- Open a GitHub issue for bug reports, feature requests, or questions.
- Enterprise customers can also reach support through standard Couchbase support channels.
License
See LICENSE.
