Unclaimed Package Is this your package? Claim it to unlock full analytics and manage your listing.
Claim This Package

Install via UPM

Add to Unity Package Manager using this URL

https://www.pkglnk.dev/icloud-kvs.git

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## Installation

Add **Key-Value Store - iCloud KVS** to your Unity project via Package Manager:

1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/icloud-kvs.git
```

[![pkglnk](https://www.pkglnk.dev/badge/icloud-kvs.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/icloud-kvs)

Dependencies (1)

README

iCloud Key-Value Store for Unity

Key-Value Store implementation backed by iCloud KVS.

Features

  • ICloudKeyValueStore: Key-Value Store implementation that stores data using iCloud KVS.
  • Supports macOS, iOS, tvOS and visionOS

Dependencies

  • Key-Value Store: interface used by this implementation, which also provides custom object serialization out of the box.

How to install

Either:

  • Install using the Unity Package Manager with the following URL:
    https://github.com/gilzoide/unity-key-value-store-icloud-kvs.git#1.0.0-preview1
    
  • Clone this repository or download a snapshot of it directly inside your project's Assets or Packages folder.

Basic usage

using Gilzoide.KeyValueStore.ICloudKvs;
using UnityEngine;

// 1. Instantiate a ICloudKeyValueStore
var kvs = new ICloudKeyValueStore();


// 2. Set/Get/Delete values
kvs.SetBool("finishedTutorial", true);
kvs.SetString("username", "gilzoide");

Debug.Log("Checking if values exist: " + kvs.HasKey("username"));
Debug.Log("Getting values: " + kvs.GetInt("username"));
Debug.Log("Getting values with fallback: " + kvs.GetString("username", "default username"));
// Like C# Dictionary, this idiom returns a bool if the key is found
if (kvs.TryGetString("someKey", out string foundValue))
{
    Debug.Log("'someKey' exists: " + foundValue);
}

kvs.DeleteKey("someKey");

Comments

No comments yet. Be the first!