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.*
Retrieves a record's metadata as a table — see Return Values below for details.
The returned table contains the following fields (if available):
"recordName"
— string indicating the record's unique identifier.
"type"
— string indicating the type of the record.
"creationTime"
— number indicating the time that the record was created. Output is similar to os.time().
"modificationTime"
— number indicating the last time the record was successfully saved to iCloud. Output is similar to os.time().
"zoneName"
— string indicating the zone name.
"zoneOwner"
— string indicating the zone owner.
"lastModifiedUserRecordID"
— table containing references to the user who last modified the record.
"creatorUserRecordID"
— table containing references to the user who created the record.
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 } )