iCloud.docInit()

Type Function
Return value none
Revision Release 2024.3703
Keywords iCloud, sync, storage, document, docInit
See also iCloudDocEvent
iCloud.*

Overview

Initializes document (file) storage/sharing for the app and invokes the onComplete listener function with an iCloudDocEvent.

Syntax

iCloud.docInit( params )
params (required)

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

Parameter Reference

Valid keys for the params table include:

Example

local function docListener( event )

    if event.isError then
        print( "iCloud file storage is not available!" )
    end
end

iCloud.docInit( { onComplete=docListener } )