Skip to content

jamesnocentini/couchbase-lite-net

 
 

Repository files navigation

Stories in Ready Stories in Progress Couchbase Lite for .NET GitHub release

Couchbase Lite is a lightweight embedded NoSQL database that has built-in sync to larger backend structures, such as Couchbase Server.

This is the source repo of Couchbase Lite C#. It is originally a port of Couchbase Lite from Couchbase Lite Android.

Documentation Overview

Getting Couchbase Lite from Nuget

These are the packages that are created by this repo: Couchbase.Lite, Couchbase.Lite.Listener, Couchbase.Lite.Listener.Bonjour, Couchbase.Lite.Storage.SystemSQLite, Couchbase.Lite.Storage.SQLCipher, Couchbase.Lite.Storage.ForestDB. For more information about the last three, see StorageEngineOverview.md

Building Couchbase Lite master branch from source

Please use git to clone the repo, rather than downloading it from a zip file. This ensures two things: that I will always know by looking at the logs which git commit you built your source from if you file a bug report, and that you will be able to pull the appropriate submodules if you are targeting .NET 3.5 or Unity. After you clone the repo, or change branches, be sure to update the submodules with this command git submodule update --init --recursive

You can build Couchbase Lite using either of the following:

The solution files ending in VS2013 are for use in Visual Studio, while the ones that do not are meant for Xamarin Studio. There are a number of projects and platforms so here are the key parts to look for. Currently there are three "projects" and five "platforms" and you can identify them as in the following:

<Name>.<Platform>

<Name> is one of the following:

  • Couchbase.Lite - The core Couchbase Lite library
  • Couchbase.Lite.Listener - The Couchbase Lite P2P REST API server implementation
  • Couchbase.Lite.Listener.Bonjour - The optional Bonjour service discover mechanism for P2P

<Platform> is one of the following:

  • Net45 - Mono / .NET 4.5
  • Net35 - Mono / .NET 3.5
  • iOS - iOS
  • Android - Android
  • Unity - Unity (either all-purpose, or "Windows Standalone" depending on the project)
  • UnityAndroid - Unity Android Player
  • UnityApple - Unity iOS and OS X Standalone

Note that you must have a Xamarin paid license to build for iOS or Android. Furthermore, to build any of the Unity projects you must supply the UnityEngine.dll file to the project. If your Unity install is in the default location, then the project will copy it as part of the build. Otherwise, it needs to go in the src/Couchbase.Lite.Unity/vendor/Unity folder. If you can't build the project then file an issue here.

ForestDB requires native components to be built for each platform you want to target. Those need to be put in src/Couchbase.Lite.Shared/vendor/cbforest/prebuilt. You can either download the binaries from a GitHub release page (starting with 1.2) or build them yourself. Building instructions can be found here.

Other Notes

Running Tests

The replication unit tests currently require a running instance of sync_gateway. Prior to running the replication tests, start sync_gateway by running the start_gateway script found in the root of the project

The iOS and Android unit tests require a custom test runner so to run them you must first run the init-unit.sh script in the respective Couchbase.Lite.<Platform>.Tests directory

Example Apps

GitHub license

About

A lightweight, document-oriented (NoSQL), syncable database engine for .NET

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.6%
  • Other 0.4%