Skip to main content

Reference

API Reference

reload()

export const reload = (): Promise<void>

Reload the webview


syncOne(...)

export const syncOne = async (options: SyncOneOptions): Promise<SyncResult>

Sync One

ParamType
optionsSyncOneOptions

Returns: Promise<SyncResult>


syncAll(...)

export const syncAll = (callback: SyncCallback): void

Sync All

ParamType
callbackSyncCallback)

syncSome(...)

export const syncSome(options: SyncSomeOptions, callback: SyncCallback): void

Sync Some

ParamType
optionsSyncSomeOptions
callbackSyncCallback)

Interfaces

SyncResult

PropType
namestring
activeApplicationPathChangedboolean
source'download' | 'cache' | undefined
liveUpdateLiveUpdate | undefined
snapshotSnapshot | null | undefined
metadata{ [key: string]: any } | undefined

source, liveUpdate, and snapshot are only populated for an Appflow-backed (liveUpdateConfig) sync. metadata is only populated for a provider-backed (liveUpdateProvider) sync, and only if the provider returns any. See Using a Live Update Provider.

LiveUpdateConfig

PropType
appIdstring
channelstring
autoUpdateMethodAutoUpdateMethod | undefined
maxVersionsnumber
strategy'zip' | 'differential'

LiveUpdateProviderConfig

PropType
pluginNamestring
config{ [key: string]: any } | undefined
autoUpdateMethodAutoUpdateMethod | undefined

See Using a Live Update Provider for how this is used.

LiveUpdateError

PropType
namestring | undefined
failStep'CHECK' | 'DOWNLOAD' | 'COPY' | 'UNPACK' | 'VERIFY' | 'UPDATE' | 'CANCEL' | 'SYNC'
messagestring

Snapshot

PropType
idstring
buildIdstring

SyncCallback

PropType
onError(error: LiveUpdateError) => void
onAppComplete(result: SyncResult) => void
onSyncComplete() => void

SyncOneOptions

PropType
namestring

SyncSomeOptions

PropType
namesstring[]

Type Aliases

LiveUpdate

Pick<LiveUpdateConfig, 'appId' | 'channel'>

AutoUpdateMethod

'none' | 'background'