Lightweight, embedded, syncable NoSQL database engine for iOS (and Mac!) apps.
Objective-C Objective-C++ C C++ Ruby Shell Other
Latest commit 05977be Feb 17, 2017 @pasin pasin Set custom user-agent to OpenIDController+UIKit’s webview
This is a workaround for #1621 that Google OIDC doesn't allow OAuth request by using an embedded webview.
Permalink
Failed to load latest commit information.
.github Create ISSUE_TEMPLATE.md Feb 18, 2016
BuildScripts Fixed stupid regex error in BuildFatLibrary.sh with iOS SDK >= 10 Jul 21, 2016
CouchbaseLite.xcodeproj Better support for iOS file protection and backgrounding Dec 16, 2016
Documentation Add CI iOS and CI MacOS scheme for Jenkins build Mar 22, 2016
GNUstep Updated README to add info about GNUstep. Reorganized GNUstep-specifi… May 9, 2012
Listener Allow LiteServ (and CBLManager) to set default maxRevTreeDepth Jun 15, 2016
LiteServ App Remove NSExceptionDomains Jun 3, 2016
Podspec Add libCBLJSViewCompiler to podspec by default Dec 28, 2016
Source Set custom user-agent to OpenIDController+UIKit’s webview Feb 17, 2017
Test-Mac OpenID: Don't use fake redirect_uri in UI controller Jun 16, 2016
Test-iOS Better support for iOS file protection and backgrounding Dec 16, 2016
Test-tvOS Added "CBL tvOS Test App" with unit tests Jan 21, 2016
TestData Added Android and .NET 1.4.0 files for import db tests Feb 3, 2017
Unit-Tests Fix puller tests depending on a pusher test Feb 9, 2017
Utilities API doc improvements (build as a target, docset support, etc.) Jul 23, 2013
release Comply with EE change for 2014-04-14 Apr 15, 2014
vendor Turned off logging in CBLArrayDiff Dec 20, 2016
xcconfigs Updated iOS deployment target to 8.0. Enabled some more warnings. Dec 6, 2016
.gitignore Added CBL Mac+SQLCipher target Jan 18, 2016
.gitmodules Fixed BLIP-Cocoa repository URL in .gitmodules Jun 30, 2015
CBL Test.entitlements Better support for iOS file protection and backgrounding Dec 16, 2016
CONTRIBUTING.md CONTRIBUTING.md: Issue tracker is not for questions Jun 1, 2015
GNUmakefile Merge remote-tracking branch 'origin/master' May 8, 2012
LICENSE Adding Apache 2.0 License Apache License Version 2.0, January 2004 ht… Sep 10, 2013
README.md Update links on readme Dec 20, 2016

README.md

Carthage compatible

Couchbase Lite

Couchbase Lite is an embedded lightweight, document-oriented (NoSQL), syncable database engine.

Get more info and downloads of Couchbase Lite (for iOS and Android) via the Couchbase mobile portal

Click here for official documentation for Couchbase Lite iOS

Latency matters a lot to users, so a local database takes frustration out of the equation. It’s got JSON documents, and the same map/reduce as Couchbase Server, in a pint-sized edition.

Couchbase Lite compiles natively for iOS, Android, Mac OS and .NET. Half a megabyte optimized, for quick launch and snappy user experience on occasionally connected devices when data matters.

Lightweight means:

  • Embedded: The database engine is a library linked into the app, not a separate server process.
  • Small code size: currently under 600kbytes. This is important to mobile apps, which are often downloaded over cell networks.
  • Quick startup time on relatively-slow CPUs: currently under 50ms on recent iPhones.
  • Low memory usage with typical mobile data-sets. The expectation is the number of documents will not be huge, although there may be sizable multimedia attachments.
  • "Good enough" performance with these CPUs and data-sets. (Exact figures depend on your data and application, of course.)

Document-oriented means:

  • Like Couchbase Server, it stores records in flexible JSON format instead of requiring predefined schemas or normalization.
  • Records/documents can have arbitrary-sized binary attachments, like multimedia content.
  • Your application's data format can evolve over time without any need for explicit migrations.
  • Map/reduce indexing allows fast lookups without needing to use special query languages.
  • Documents can contain free-form text or geographic coordinates, which are efficiently indexed for full-text search or geo-querying.

Syncable means:

  • Any two copies of a database can be brought into sync via an efficient, reliable, proven REST-based protocol.
  • Sync can be on-demand or continuous (with a latency of a few seconds).
  • The sync engine supports intermittent and unreliable network connections.
  • Conflicts can be detected and resolved, with app logic in full control of merging.
  • Revision trees allow for complex replication topologies, including server-to-server (for multiple data centers) and peer-to-peer, without data loss or false conflicts.

The native APIs are Objective-C (iOS, tvOS, Mac), Java (Android), and C# (.NET, Xamarin); but an optional internal REST API adapter allows it to be called from other languages like JavaScript, for use in apps built with PhoneGap/Cordova or Titanium.

More Information

Platforms

Requirements

  • It's written in Objective-C and C++.
  • Xcode 7 or later is required to build it.

Credits

Design, coding: Jens Alfke (jens@couchbase.com), Pasin Suriyentrakorn (pasin@couchbase.com) Contributions from: Alexander Edge, Chris Kau, David Venable, Derek Clarkson, Fabien Franzen, fcandalija, J Chris Anderson, Marty Schoch, Mike Lamb, Paul Mietz Egli, Robin Lu, Traun Leyden, Fonkymasto, Tiago Duarte, cflorion, Evan Kyle, Qihe Bian, sarbogast, Tim Macfarlane, mglasgow, Manu Troquet, monowerker... Technical advice from: Damien Katz, Filipe Manana, Robert Newson, and several other gurus on the CouchDB mailing list

License

  • Couchbase Lite itself, and ForestDB, are under the Apache License 2.0.
  • CocoaHTTPServer, by Robbie Hanson, is under the BSD License.
  • FMDB, by Gus Mueller, is under the MIT License.
  • Google Toolbox For Mac is under the Apache License 2.0.
  • MYUtilities (portions of which are copied into the vendor/MYUtilities directory) is under the BSD License.
  • SQLite3-unicodesn by Alexey Illiaronov, is in the public domain, but we wanted to say thanks anyway.
  • YAJL, by Lloyd Hilael, is under the ISC license (which appears similar to BSD.)

These are all permissive, commercial-friendly licenses, and you can abide by them simply by putting copyright and permission notices for each in your app's UI / credits / README. For details read the individual licenses.

Downloading Couchbase Lite

Get Couchbase Lite via the Couchbase mobile portal

Building Couchbase Lite

If you want the very latest and greatest (and possibly buggy) version, you'll need to build it yourself. For instructions see the wiki page.

Include via Carthage

Can be included in any iOS project via Carthage

Add the following line to your Cartfile:

github "couchbase/couchbase-lite-ios" "release/1.3.0"

(or substitute the branch name corresponding to the specific release you want.) Run carthage update --platform ios, and you should now have the latest version of Couchbase Lite iOS in your Carthage folder.