Skip to main content

Installation

Installation

Currently, the C# SDK runs on macOS, Windows, and Linux. Currently, there is no peer to peer capabilites of the C# SDK, however we are working on it. Xamarin iOS and Android Support are coming soon. Please email us at contact@ditto.live if these other platforms are essential for you.

The C# SDK is available as part of NuGet. The common ways to install the SDK is with either the NuGet Package Manager, the .NET CLI, or by adding a reference to the CSProj XML file.

Install-Package Ditto -Version 1.1.9

For more installation options visit the NuGet Page

Now in your code you can call:

try{    var ditto = new Ditto(DittoIdentity.OnlinePlaygroundV2("REPLACE_ME_WITH_YOUR_APP_ID", "REPLACE_ME_WITH_YOUR_PLAYGROUND_TOKEN"), path);    ditto.TryStartSync();}catch (DittoException ex){    Console.WriteLine($"Ditto Error {ex.Message}");}
var docId = ditto.Store.Collection("people").Upsert(    new Dictionary<string, object> {    { "name", "Susan" },    { "age", 31 },    });