Getting Started

If you are starting with a fresh .NET project or an existing project, follow these steps to add the Kinvey SDK to your project and set up the Kinvey Client.

The Kinvey 3.0 SDK is currently in Early Adopter phase! We are continuously making additions and improvements to the library, based on early adopter feedback. Please refer to the .NET 3.0 timeline for information on the latest updates, and check out the Current Limitations section of this guide to see what will be coming soon. If you have any questions or feedback, please contact us at support@kinvey.com.

Prerequisites

Platform Compatibility

The Kinvey.Net SDK is distributed through NuGet, and targets the following platforms:

  • .NET Framework 4.5 or later
  • Windows 8 or later
  • Windows Phone 8 or later
  • Windows Phone Silverlight 8
  • Windows Store Apps (Windows 8)

Project Set Up

Using Visual Studio

To add the Kinvey NuGet package to your project:
  • Right click on solution in Solution Explorer
  • When the context menu opens, click on "Manage NuGet Packages for Solution..."
  • When the window to manage packages opens, search for Kinvey.Net
    • Note: You must select the "Include prerelease" checkbox to make the Kinvey.Net package visible, while it is still in beta.

Using SDK Source Code

The Kinvey.Net SDK is open source. If you prefer to compile your app against the SDK source code, you can follow the instructions on our github repo to set up the SDK.

Add an App Backend

If you don't have an account on Kinvey yet, please signup before continuing.

In the Kinvey console, click "Create an App" and enter the name of your app when prompted.

Add an app in Console

You can find your key and secret in the dropdown menu in the environment sidebar.

Key and secret

Copy the key and secret when performing the next steps.

Initialize a Client

The Client.Builder is used to build and initialize the Client before making any calls to the Kinvey API.

You need to set the following arguements on your client:

  • Set your App Key and App Secret obtained from the Kinvey console.
  • Set a Logger delegate, so the SDK can write output.
  • Set a file path and SQLite implementation for persisting data.

Initializing a Client is usually done when your application first starts.

Client Creation

using Kinvey;
...

Client.Builder builder = new Client.Builder(your_app_key, your_app_secret)
            .setLogger(delegate(string msg) { Console.WriteLine(msg); })
            .setFilePath(filePath)
            .setOfflinePlatform(new SQLite.Net.Platform.Win32.SQLitePlatformWin32())

Client kinveyClient = builder.Build();

For Dedicated Kinvey customers, you'll need to set the base URL for the library to your dedicated Kinvey host URL. You can find this host URL on the dashboard of the console, next to your App Key and App Secret:

Client.Builder builder = new Client.Builder(your_app_key, your_app_secret).setBaseURL("<your dedicated host URL>");

final Client kinveyClient = builder.Build();

Verify Set Up

You can use the PingAsync() method on the kinveyClient object to verify that the app has valid credentials.

try
{
    PingResponse response = await kinveyClient.PingAsync();
}
catch (Exception e)
{
    // an error has occured
}

Current Limitations

The Kinvey 3.0 SDK is currently in beta, and while we are continuously adding features and fixing issues as we move towards a 3.0 release, there are still limitations in the current beta offering. The following is a list of features not yet implemented:

  • DataStore:
    • Delete by query
  • Files:
    • File deletion
    • Link data to images
  • Implementation of Location Services
  • Encryption of the local persistent data at rest
  • API for modifying Access Control Lists on the client-side
  • Cancellation token support
  • More detailed error code documentation in the troubleshooting guide

Every App has an Active User

Your app will be used by a real-life human being. This person is represented by the Active User. This user object must explicitly be created, either with a username and password, OAuth sign-on (such as Facebook, Google+, LinkedIn, etc.), or Mobile Identity Connect. See the User Guide for more information.

What's next

You are now ready to start building your awesome apps! Next we recommend diving into the User Guide or Data Store Guide to learn more about our service, or explore the sample apps to go straight to working projects.

Got a question?