iCloud.get()

Type Function
Return value String, Number, or Table
Revision Current Public Release (2018.3326)
Keywords iCloud, sync, storage, Key-Value Storage, KVS, get
See also iCloud.set()
iCloud.synchronize()
iCloud.*

Overview

Retrieves the value from a stored key. It will return the same type that the value was stored as (string, number, or table). If the key is not found in KVS, this function returns nil.

Note that values are not instantly synchronized across the user's iCloud-enabled devices and that it may take some time for updated values to be reflected by this call.

Syntax

iCloud.get( key )
key (required)

String. The key name from which to retrieve a value.

Examples

local value = iCloud.get( "touches" )

local json = require( "json" )
local someTable = json.decode( iCloud.get( "data" ) )
print( json.prettify( someTable ) )