0.0.3 • Published 3 years ago

capacitor-code-update v0.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

capacitor-code-update

Capacitor-Code-Update

Install

npm install capacitor-code-update
npx cap sync

API

checkUpdate()

checkUpdate() => Promise<Update | null>

Returns: Promise<Update | null>


download(...)

download(option: Update) => Promise<LocalPackage | null>
ParamType
optionUpdate

Returns: Promise<LocalPackage | null>


install(...)

install(option: { installMode: InstallMode; }) => Promise<InstallResult>
ParamType
option{ installMode: InstallMode; }

Returns: Promise<InstallResult>


addListener('downloadProgress', ...)

addListener(eventName: 'downloadProgress', listenerFunc: (percent: string) => void) => Promise<PluginListenerHandle>
ParamType
eventName'downloadProgress'
listenerFunc(percent: string) => void

Returns: Promise<PluginListenerHandle>


Interfaces

Update

PropType
idstring
namestring
signaturestring
downloadUrlstring
updateType'FULL_UPDATE' | 'INCREMENTAL_UPDATE'

LocalPackage

PropType
versionstring
applicationIdstring
versionNamestring
signaturestring
updateTypestring

InstallResult

PropType
successboolean

PluginListenerHandle

PropType
remove() => Promise<void>

Enums

InstallMode

Members
IMMEDIATE
NEXT_RESUME
NEXT_RESTART