capacitor-code-update
v0.0.3
Published
Capacitor-Code-Update
Readme
capacitor-code-update
Capacitor-Code-Update
Install
npm install capacitor-code-update
npx cap syncAPI
checkUpdate()
checkUpdate() => Promise<Update | null>Returns: Promise<Update | null>
download(...)
download(option: Update) => Promise<LocalPackage | null>| Param | Type |
| ------------ | ----------------------------------------- |
| option | Update |
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
| Prop | Type |
| ------------- | -------------------- |
| success | boolean |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
Enums
InstallMode
| Members |
| ------------------ |
| IMMEDIATE |
| NEXT_RESUME |
| NEXT_RESTART |
