0.0.3 • Published 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>
Returns: Promise<LocalPackage | null>
install(...)
install(option: { installMode: InstallMode; }) => Promise<InstallResult>
| Param | Type |
|---|
option | { installMode: InstallMode; } |
Returns: Promise<InstallResult>
addListener('downloadProgress', ...)
addListener(eventName: 'downloadProgress', listenerFunc: (percent: string) => void) => Promise<PluginListenerHandle>
| Param | Type |
|---|
eventName | 'downloadProgress' |
listenerFunc | (percent: string) => void |
Returns: Promise<PluginListenerHandle>
Interfaces
Update
| Prop | Type |
|---|
id | string |
name | string |
signature | string |
downloadUrl | string |
updateType | 'FULL_UPDATE' | 'INCREMENTAL_UPDATE' |
LocalPackage
| Prop | Type |
|---|
version | string |
applicationId | string |
versionName | string |
signature | string |
updateType | string |
InstallResult
PluginListenerHandle
| Prop | Type |
|---|
remove | () => Promise<void> |
Enums
InstallMode
| Members |
|---|
IMMEDIATE |
NEXT_RESUME |
NEXT_RESTART |