CloudKitRecord:metadata()

Type Function
Object CloudKitRecord
Return value Table
Revision 2017.3060
Keywords iCloud, sync, storage, CloudKit, CloudKitRecord, metadata
See also CloudKitRecord
CloudKitRecord:table()
CloudKitRecord:get()
iCloud.*

Overview

Retrieves a record's metadata as a table — see Return Values below for details.

Syntax

CloudKitRecord:metadata()

Return Values

The returned table contains the following fields (if available):

Example

local json = require( "json" )

local function fetchResults( event )

    if event.record then
        print( json.prettify( event.record:metadata() ) )
    else
        print( "Record not fetched!" )
    end
end

iCloud.recordFetch(
    {
        recordName = "Corona Labs 1",
        onComplete = fetchResults
    }
)