CloudKitRecord:save()

Type Function
Object CloudKitRecord
Return value none
Revision Release 2024.3703
Keywords iCloud, sync, storage, CloudKit, CloudKitRecord, save
See also CloudKitRecord
CloudKitRecord:set()
iCloud.*

Overview

Saves contents of the record to the CloudKit database.

Syntax

CloudKitRecord:save( params )
params (required)

Table. Table with method-specific parameters — see the next section for details.

Parameter Reference

Valid keys for the params table include:

Example

local recordData = {
    company = { type="string", string="Corona Labs" },
    when = { type="date", time=-1449201382 },
    where = { type="location", latitude=37.453139, longitude=122.113451 },
    amount = { type="number", number=1 }
}

local record = iCloud.recordCreate(
    {
        type = "company",
        recordName = "Corona Labs 1",
        table = recordData
    }
)

record:save()