跳过内容

功能和设置

__CAPGO_KEEP_11__

Updater 插件配置

查看更多信息:Github README 更多信息,请参阅README。

CapacitorUpdater 可以使用以下选项进行配置:

属性类型描述默认值
appReadyTimeoutnumber配置 native 插件在等待更新之前等待的毫秒数。可用于 Android、iOS 和 Electron。10000 // (10 seconds)
responseTimeoutnumber配置 native 插件在等待 API 超时之前等待的毫秒数。可用于 Android、iOS 和 Electron。20000 // (20 seconds)
autoDeleteFailedbooleanConfigure whether the plugin should automatically delete failed bundles. Available on Android, iOS, and Electron.true
autoDeletePreviousbooleanConfigure whether the plugin should automatically delete previous bundles after a successful update. Available on Android, iOS, and Electron.true
autoUpdateboolean | ‘off’ | ‘atBackground’ | ‘atInstall’ | ‘onLaunch’ | ‘always’ | ‘onlyDownload’Configure how the plugin should use Auto Update via an update server. true is the same as “atBackground”; false is the same as “off”. - off: Disable Auto Update - atBackground: Check and download automatically, then apply when the app moves to the background - atInstall: Apply immediately only after a fresh install or native app update, otherwise use atBackground - onLaunch: Apply immediately on launch, otherwise use atBackground after the launch check - always: Apply immediately whenever Auto Update runs - onlyDownload: Check and download automatically, emit updateAvailable, and never set the next bundle automatically. Available on Android, iOS, and Electron.”atBackground” // true is still accepted
resetWhenUpdatebooleanAutomatically delete previous downloaded bundles when a newer native app bundle is installed to the device. Available on Android, iOS, and Electron.true
updateUrlstringConfigure the URL / endpoint to which update checks are sent. Available on Android, iOS, and Electron.https://plugin.capgo.app/updates
channelUrlstringConfigure the URL / endpoint for channel operations. Available on Android, iOS, and Electron.https://plugin.capgo.app/channel_self
statsUrlstringConfigure the URL / endpoint to which update statistics are sent. Available on Android, iOS, and Electron. Set to "" to disable stats reporting.https://plugin.capgo.app/stats
publicKeystringConfigure the public key for end to end live update encryption Version 2. Available on Android, iOS, and Electron.undefined6.2.0
versionstringConfigure the current version of the app. This will be used for the first update request. If not set, the plugin will get the version from the native code. Available on Android, iOS, and Electron.undefined4.17.48
directUpdateboolean | ‘always’ | ‘atInstall’ | ‘onLaunch’已弃用。请使用“atInstall”,“onLaunch”或“always”模式代替: - false:永不进行直接更新 - atInstall:与autoUpdate:“atInstall”相同 - onLaunch:与autoUpdate:“onLaunch”相同 - always:与autoUpdate:“always”相同 - true:与“always”相同(为了向后兼容)。 Available on Android, iOS, and Electron.false5.1.0
autoSplashscreenboolean自动处理使用即时应用模式的启动屏幕隐藏。 当启用时,插件将在更新应用程序或无需更新时自动隐藏启动屏幕。 这消除了手动监听appReady事件并调用SplashScreen.hide()的需要。 只有在autoUpdate设置为“atInstall”,“onLaunch”或“always”时才有效。 Legacy directUpdate值仍然支持为向后兼容。 需要@capacitor/splash-screen插件安装并配置launchAutoHide:false。 需要启用自动更新。 Available on Android and iOS.false7.6.0
periodCheckDelaynumber配置周期性更新检查的延迟时间。单位为秒。 Available on Android, iOS, and Electron。 不能小于600秒(10分钟)。600 // (10 minutes)
localS3boolean配置CLI以使用本地服务器进行测试或自托管更新服务器.undefined4.17.48
localHoststring配置CLI以使用本地服务器进行测试或自托管更新服务器.undefined4.17.48
localWebHoststring配置CLI以使用本地服务器进行测试或自托管更新服务器.undefined4.17.48
localSupastring配置CLI以使用本地服务器进行测试或自托管更新服务器.undefined4.17.48
localSupaAnonstring配置CLI以使用本地服务器进行测试.undefined4.17.48
localApistring配置CLI以使用本地api进行测试.undefined6.3.3
localApiFilesstring配置CLI以使用本地文件api进行测试.undefined6.3.3
allowModifyUrlboolean允许插件动态从JavaScript端修改updateUrl、statsUrl和channelUrl。false5.4.0
defaultChannelstring设置应用程序的默认频道在配置中。大小写敏感。这将设置将覆盖云中设置的默认频道,但仍将尊重云中设置的覆盖项。undefined5.5.0
appIdstring配置应用程序ID在配置中。undefined6.0.0
keepUrlPathAfterReloadboolean配置插件以在重载后保留URL路径。警告:当触发重载时,‘window.history’将被清除。false6.8.0
disableJSLoggingboolean禁用插件的JavaScript日志。如果为true,插件将不会在JavaScript控制台中记录。只有本机日志会被执行。false7.3.0
shakeMenuboolean通过摇晃手势显示更新菜单(用于调试/测试目的)false7.5.0

capacitor.config.json:

{
"plugins": {
"CapacitorUpdater": {
"appReadyTimeout": 1000 // (1 second),
"responseTimeout": 10 // (10 second),
"autoDeleteFailed": false,
"autoDeletePrevious": false,
"autoUpdate": "onlyDownload",
"resetWhenUpdate": false,
"updateUrl": https://example.com/api/auto_update,
"channelUrl": https://example.com/api/channel,
"statsUrl": https://example.com/api/stats,
"publicKey": undefined,
"version": undefined,
"directUpdate": undefined,
"autoSplashscreen": undefined,
"periodCheckDelay": undefined,
"localS3": undefined,
"localHost": undefined,
"localWebHost": undefined,
"localSupa": undefined,
"localSupaAnon": undefined,
"localApi": undefined,
"localApiFiles": undefined,
"allowModifyUrl": undefined,
"defaultChannel": undefined,
"appId": undefined,
"keepUrlPathAfterReload": undefined,
"disableJSLogging": undefined,
"shakeMenu": undefined
}
}
}

capacitor.config.ts:

import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
plugins: {
CapacitorUpdater: {
appReadyTimeout: 1000 // (1 second),
responseTimeout: 10 // (10 second),
autoDeleteFailed: false,
autoDeletePrevious: false,
autoUpdate: 'onlyDownload',
resetWhenUpdate: false,
updateUrl: https://example.com/api/auto_update,
channelUrl: https://example.com/api/channel,
statsUrl: https://example.com/api/stats,
publicKey: undefined,
version: undefined,
directUpdate: undefined,
autoSplashscreen: undefined,
periodCheckDelay: undefined,
localS3: undefined,
localHost: undefined,
localWebHost: undefined,
localSupa: undefined,
localSupaAnon: undefined,
localApi: undefined,
localApiFiles: undefined,
allowModifyUrl: undefined,
defaultChannel: undefined,
appId: undefined,
keepUrlPathAfterReload: undefined,
disableJSLogging: undefined,
shakeMenu: undefined,
},
},
};
export default config;

notifyAppReady()

“notifyAppReady()”
notifyAppReady() => Promise<AppReadyResult>

通知Capacitor更新器当前包正在运行(如果不在每次应用启动时调用此方法,则会发生回滚) 默认情况下,此方法应在应用启动后第 10 秒内调用,否则会发生回滚。 可以通过 {@link appReadyTimeout} 来更改此行为

返回: Promise<AppReadyResult>


setUpdateUrl(…)

“setUpdateUrl(…)
setUpdateUrl(options: UpdateUrl) => Promise<void>

设置应用更新的 URL,这将用于检查更新。

参数类型描述
optionsUpdateUrl包含用于检查更新的 URL。

自从: 5.4.0


setStatsUrl(options: StatsUrl) => Promise<void>

设置应用程序的statsUrl,用于发送统计数据。传入一个空字符串将禁用统计数据收集。

参数类型描述
optionsStatsUrl包含用于发送统计数据的URL。

自从: 5.4.0


自从:__CAPGO_KEEP_0__

自从:__CAPGO_KEEP_0__
setChannelUrl(options: ChannelUrl) => Promise<void>

设置应用的channelUrl,这将用于设置频道。

参数类型描述
optionsChannelUrl包含用于设置频道的URL。

自: 5.4.0


download(options: DownloadOptions) => Promise<BundleInfo>

从提供的URL下载一个新的包,应该是一个zip文件,或者一个唯一id的包,包含所有文件

参数类型描述
optionsDownloadOptionsThe {@link 下载选项用于下载一个新的bundle zip。

返回: Promise<BundleInfo>


next(options: BundleId) => Promise<BundleInfo>

设置下次重载应用时使用的bundle。

参数类型描述
optionsBundleId包含下一次应用启动时设置的下一个捆绑包的 ID。 {@link 捆绑包信息.id}

返回: Promise<BundleInfo>


set(options: BundleId) => Promise<void>

设置当前捆绑包并立即重新加载应用。

参数类型描述
optionsBundleId一个 {@link BundleId包含新 Bundle ID 的对象,设置为当前。

delete(options: BundleId) => Promise<void>

从原生应用存储中删除指定的 Bundle。使用 {@link list} 来获取存储的 Bundle ID。

参数类型描述
optionsBundleId一个 {@link BundleId} 对象,包含要删除的 Bundle ID(注意,这是 Bundle ID,而不是版本名称)

list(options?: ListOptions | undefined) => Promise<BundleListResult>

获取本地下载的所有包

参数类型描述
optionsListOptions用于列出包的 {@link ListOptions} 返回:reset(…)

用于列出包的配置选项 Promise<BundleListResult>


reset(options?: ResetOptions | undefined) => Promise<void>

将应用程序重置为 builtin 应用程序包(发送到 Apple App Store / Google Play Store)或最后成功加载的包。

参数类型描述
optionsResetOptions包含 {@link ResetOptions.toLastSuccessful}, true 重置为内置包,并 false 将重置为最后成功加载的包。

current() => Promise<CurrentBundleResult>

获取当前的 bundle,如果没有设置则返回 builtin. currentNative 是设备上安装的原始 bundle

返回: Promise<CurrentBundleResult>


reload() => Promise<void>

重新加载视图


setMultiDelay(options: MultiDelayConditions) => Promise<void>

设置一个 {@link DelayCondition} 数组,包含 Plugin 将使用的延迟更新条件。 当所有条件都满足后,更新过程将重新启动,通常的更新安装过程将在后台或杀死应用后继续。 对于 "kind",值应为 ISO8601 日期字符串。 对于 "kind",值应为毫秒数。 对于 "kind",值应为版本号。 对于 "kind",值不被使用。 该函数在选项 "kill" 时存在不一致的行为,杀死应用后会触发更新,而不是在下一次后台运行时。 此问题将在未来一个主要版本中得到修复。 参数 类型描述 date 包含 {@link MultiDelayConditions} background Param nativeVersion Type kill Description

Containing the {@link MultiDelayConditions}DelayConditionarray
optionsMultiDelayConditionsAn array of conditions that the Plugin will use to delay the update. For the "kind" field, the value should be an iso8601 date string. For the "kind" field, the value should be a number in milliseconds. For the "kind" field, the value should be the version number. For the "kind" field, the value is not used. This function has inconsistent behavior when the option "kill" is used, it will trigger the update after the first kill and not after the next background like other options. This will be fixed in a future major release. DelayCondition条件数组来设置

自从: 4.3.0


cancelDelay() => Promise<void>

取消一个 {@link DelayCondition} 来立即处理更新。 自从:getLatest(…)

标题:“getLatest(…) 4.0.0


复制到剪贴板

自从:
getLatest(options?: GetLatestOptions | undefined) => Promise<LatestVersion>

获取最新的 bundle 可从更新 URL 中获取

参数类型
optionsGetLatestOptions

返回值: Promise<LatestVersion>

自: 4.0.0


setChannel(options: SetChannelOptions) => Promise<ChannelRes>

设置设备的通道。通道必须 allow_device_self_set 为此功能启用。

重要注意事项:

  • 不要在启动时使用此方法设置通道。使用 defaultChannel 在您的Capacitor配置中代替。
  • 此方法适用于应用程序准备就绪且用户已交互(例如,选择参加beta测试)后使用。
  • 公共频道无法自行分配。 如果一个频道被标记为 public,调用 setChannel() 将返回错误。要使用公共频道,请调用 unsetChannel() - 设备将自动切换到匹配的公共频道。
  • 使用 listChannels() 来发现哪些频道可用并是否允许自行分配。
参数类型描述
optionsSetChannelOptions是否设置 '{@link' 设置通道选项返回:

Promise<ChannelRes>

unsetChannel(…) 4.7.0


标题:unsetChannel(…)

复制到剪贴板
unsetChannel(options: UnsetChannelOptions) => Promise<void>

公共通道 接收更新。 此功能在以下情况下有用:

__CAPGO_KEEP_0__

  • 您想将设备恢复到默认的更新通道
  • 您想使用公共频道(由于公共频道无法自行分配,因此需要通过 setChannel())
ParamType
optionsUnsetChannelOptions

自: 4.7.0


getChannel() => Promise<GetChannelRes>

获取该设备的频道

返回: Promise<GetChannelRes>

自: 4.8.0


listChannels() => Promise<ListChannelsResult>

获取此设备可用的所有频道列表。返回与设备当前环境(平台、模拟器/真实设备、开发/生产构建)兼容的频道,且为公共频道或允许自我分配。

结果中的每个频道包括:

  • public: 如果 true,这是一个 默认频道。您无法使用 setChannel()将其设置为自我分配。相反,如果您使用 unsetChannel()移除您的频道分配,设备将自动从公共频道接收更新。
  • allow_self_set: 如果 true,这是一个 自定义频道您可以使用以下方法显式地将设备分配到此频道 setChannel().

返回: Promise<ListChannelsResult>

7.5.0


自定义ID(setCustomId(…))

复制到剪贴板
setCustomId(options: SetCustomIdOptions) => Promise<void>

参数

类型描述是 {@link}
optionsSetCustomIdOptions自定义频道 设置自定义ID选项} 设置自定义ID

自从: 4.9.0


获取内置版本()

标题:获取内置版本()
getBuiltinVersion() => Promise<BuiltinVersion>

获取本机应用程序版本或配置中设置的内置版本

返回: Promise<BuiltinVersion>

自从: 5.2.0


getDeviceId() => Promise<DeviceId>

获取用于识别设备的唯一 ID(发送到自动更新服务器)

返回: Promise<DeviceId>


getPluginVersion() => Promise<PluginVersion>

获取本机 Capacitor Updater 插件版本(发送到自动更新服务器)

返回: Promise<PluginVersion>


isAutoUpdateEnabled() => Promise<AutoUpdateEnabled>

获取自动更新配置的状态。

返回: Promise<AutoUpdateEnabled>


removeAllListeners() => Promise<void>

移除此插件的所有监听器。

Since: 1.0.0


addListener(eventName: 'download', listenerFunc: (state: DownloadEvent) => void) => Promise<PluginListenerHandle>

监听 App 下载事件。下载开始、下载中和下载完成时触发一次。 此事件将返回下载进度。

参数类型
eventName’download’
listenerFunc(state: DownloadEvent) => void

返回: Promise<PluginListenerHandle>

自从: 2.0.11


addListener(‘noNeedUpdate’, …)

标题:添加监听器(‘noNeedUpdate’,…)
addListener(eventName: 'noNeedUpdate', listenerFunc: (state: NoNeedEvent) => void) => Promise<PluginListenerHandle>

在应用程序启动时每次都强制检查更新,非常有用

参数类型
eventName’noNeedUpdate’
listenerFunc(state: NoNeedEvent) => void

返回: Promise<PluginListenerHandle>

自从: 4.0.0


addListener(‘updateAvailable’, …)

标题:添加监听器(‘updateAvailable’,…)
addListener(eventName: 'updateAvailable', listenerFunc: (state: UpdateAvailableEvent) => void) => Promise<PluginListenerHandle>

Listen for available update event, useful when you want to force check every time the app is launched

ParamType
eventName’updateAvailable’
listenerFunc(state: UpdateAvailableEvent) => void

Returns: Promise<PluginListenerHandle>

Since: 4.0.0


addListener(‘downloadComplete’, …)

下载完成事件监听
addListener(eventName: 'downloadComplete', listenerFunc: (state: DownloadCompleteEvent) => void) => Promise<PluginListenerHandle>

Listen for downloadComplete events.

ParamType
eventName’downloadComplete’
listenerFunc(state: DownloadCompleteEvent) => void

Returns: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘majorAvailable’,…)

标题:添加监听器(‘majorAvailable’,…)
addListener(eventName: 'majorAvailable', listenerFunc: (state: MajorAvailableEvent) => void) => Promise<PluginListenerHandle>

在 App 中监听重大更新事件,让您知道重大更新是否被禁用

参数类型
eventName’majorAvailable’
listenerFunc(state: MajorAvailableEvent) => void

返回: Promise<PluginListenerHandle>

自: 2.3.0


addListener(‘updateFailed’,…)

标题:添加监听器(‘updateFailed’,…)
addListener(eventName: 'updateFailed', listenerFunc: (state: UpdateFailedEvent) => void) => Promise<PluginListenerHandle>

在 App 中监听更新失败事件,让你知道下次启动 App 时更新安装失败

参数类型
eventName’updateFailed’
listenerFunc(state: UpdateFailedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 2.3.0


addListener(‘downloadFailed’,…)

标题:addListener(‘downloadFailed’,…)
addListener(eventName: 'downloadFailed', listenerFunc: (state: DownloadFailedEvent) => void) => Promise<PluginListenerHandle>

在 App 中监听下载失败事件,让你知道一个包下载失败

参数类型
eventName’downloadFailed’
listenerFunc(state: DownloadFailedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘appReloaded’,…)

标题:addListener(‘appReloaded’,…)
addListener(eventName: 'appReloaded', listenerFunc: () => void) => Promise<PluginListenerHandle>

在 App 中监听重载事件,让你知道何时发生重载

参数类型
eventName’appReloaded’
listenerFunc() => void

返回: Promise<PluginListenerHandle>

自: 4.3.0


addListener(‘appReady’,…)

标题:addListener(‘appReady’,…)
addListener(eventName: 'appReady', listenerFunc: (state: AppReadyEvent) => void) => Promise<PluginListenerHandle>

Listen for app ready event in the App, let you know when app is ready to use

ParamType
eventName’appReady’
listenerFunc(state: AppReadyEvent) => void

Returns: Promise<PluginListenerHandle>

Since: 5.1.0


isAutoUpdateAvailable()

Section titled “”
isAutoUpdateAvailable() => Promise<AutoUpdateAvailable>

Get if auto update is available (not disabled by serverUrl).

Returns: Promise<AutoUpdateAvailable>


getNextBundle()

Section titled “”
getNextBundle() => Promise<BundleInfo | null>

当应用重新加载时,将使用的下一个捆绑包。 如果没有设置下一个捆绑包,则返回 null。

返回: Promise<BundleInfo | null>

自从: 6.8.0


setShakeMenu(options: SetShakeMenuOptions) => Promise<void>

用于调试/测试目的启用或禁用抖动菜单

参数类型描述
optionsSetShakeMenuOptions包含启用或禁用抖动菜单的布尔值

自从: 7.5.0


是否启用摇动菜单()

标题:是否启用摇动菜单()
isShakeMenuEnabled() => Promise<ShakeMenuEnabled>

获取当前摇动菜单状态

返回: Promise<ShakeMenuEnabled>

自从: 7.5.0


应用就绪结果

标题:应用就绪结果
属性类型
bundleBundleInfo

打包信息

打包信息
属性类型
idstring
versionstring
downloadedstring
checksumstring
statusBundleStatus

更新地址

更新地址
属性类型
urlstring

统计地址

统计地址
属性类型
urlstring

__CAPGO_KEEP_0__

频道URL
属性类型
urlstring

下载选项

频道URL

This URL and versions are used to download the bundle from the server, If you use backend all information will be given by the method getLatest. If you don’t use backend, you need to provide the URL and version of the bundle. SessionKey are required if you encrypted the bundle with the CLI command encrypt, you should receive them as result of the command.

类型描述默认值如果您使用后端,所有信息将由方法getLatest提供。如果您不使用后端,则需要提供包的URL和版本。若您使用__CAPGO_KEEP_0__命令加密包,请提供会话密钥,若加密结果,则应从命令结果中获取会话密钥。由于
urlstring此包的下载地址(例如:dist.zip)。(此地址可以是任何URL。例如:Amazon S3,一个 GitHub 标签,或者您已经托管的包的任何其他地方。
versionstring此包的版本 code/name
sessionKeystring此包的更新会话密钥,包是用会话密钥加密的undefined4.0.0
checksumstring此包的更新校验和,应为sha256并且如果包是加密的,则应使用私钥加密undefined4.0.0
manifestManifestEntry[]Delta(manifest)多文件下载的清单undefined6.1.0

清单项

清单项
属性类型
file_namestring | null
file_hashstring | null
download_urlstring | null

包ID

包ID
属性类型
idstring

捆绑列表结果

捆绑列表结果
属性类型
bundlesBundleInfo[]

列表选项

列表选项
描述默认值__CAPGO_KEEP_0____CAPGO_KEEP_0__是否返回原始包列表或清单。如果为真,列表将尝试读取内部数据库而不是磁盘上的文件。
rawboolean重置选项false6.14.0

重置选项

属性
类型当前包结果
toLastSuccessfulboolean

当前包结果

属性
类型多延迟条件
bundleBundleInfo
nativestring

多延迟条件属性

类型
属性类型
delayConditionsDelayCondition[]

__CAPGO_KEEP_0__

延迟条件
属性类型__CAPGO_KEEP_0__
kindDelayUntilNext设置多个延迟条件
valuestring

最新版本

延迟条件
属性类型描述
versionstringgetLatest方法的结果4.0.0
checksumstring6
majorboolean
messagestring
sessionKeystring
errorstring
oldstring
urlstring
manifestManifestEntry[]6.1
属性类型描述默认值
channelstring获取最新版本的渠道 The channel must allow ‘self_assign’ for this to workundefined6.8.0

ChannelRes

频道设置
属性类型描述
statusstring当前设置的频道状态4.7.0
errorstring
messagestring

设置频道选项

设置频道选项
属性类型
channelstring
triggerAutoUpdateboolean

取消设置频道选项

取消设置频道选项
属性类型
triggerAutoUpdateboolean

获取频道结果

获取频道结果
属性类型描述
channelstring获取频道当前状态4.8.0
errorstring
messagestring
statusstring
allowSetboolean

ListChannelsResult

获取频道结果
属性类型描述
channelsChannelInfo[]可用渠道列表7.5.0

ChannelInfo

渠道信息
属性类型描述
idnumber渠道ID7.5.0
namestring渠道名称7.5.0
publicboolean如果为 true,则这是一个默认/备用通道。设备无法自行将其分配到公共通道。相反,当设备移除其通道覆盖(使用“”)时,它将自动从匹配的公共通道接收更新。 unsetChannel()如果为 true,则设备可以使用“”显式将其分配到此通道。通常用于 beta 测试、A/B 测试或优选更新跟踪。7.5.0
allow_self_setboolean通道命令使用通道“”,而不是此数字“”。 setChannel()SetCustomIdOptions7.5.0

标题:SetCustomIdOptions nameProp id.

标题:BuiltinVersionIf true, devices can explicitly self-assign to this channel using __CAPGO_KEEP_0__. This is typically used for beta testing, A/B testing, or opt-in update tracks.
customIdstring

Channel commands use the channel __CAPGO_KEEP_0__, not this numeric __CAPGO_KEEP_1__.

SetCustomIdOptions
属性类型
versionstring

设备ID

设备ID
属性类型
deviceIdstring

插件版本

插件版本
属性类型
versionstring

自动更新

自动更新
属性类型
enabledboolean

插件监听器句柄

插件监听器句柄
属性类型
remove() => Promise<void>

下载事件

下载事件
属性类型描述
percentnumber下载进度,范围为 0 到 100。4.0.0
bundleBundleInfo

NoNeedEvent

无需事件
Prop类型描述
bundleBundleInfo下载进度,范围为 0 到 100。4.0.0

UpdateAvailableEvent

更新可用事件
Prop类型描述
bundleBundleInfo下载进度,范围为 0 到 100。4.0.0

下载完成事件

下载完成事件
属性类型描述
bundleBundleInfo当有新更新可用时触发。4.0.0

重大更新事件

重大更新事件
属性类型描述
versionstring当有新主要捆绑包可用时发射。4.0.0
属性类型描述
bundleBundleInfo安装更新失败时发射。4.0.0

下载失败事件

下载失败事件
属性类型描述
versionstring下载失败时触发4.0.0

应用就绪事件

下载失败事件
属性类型描述自从
bundleBundleInfo应用程序准备好使用时发出。5.2.0
statusstring

自动更新可用

自动更新可用
属性类型
availableboolean

设置抖动菜单选项

设置抖动菜单选项
属性类型
enabledboolean

抖动菜单启用

抖动菜单启用
属性类型
enabledboolean

类型别名

类型别名

打包状态

打包状态

pending: 打包正在等待... SET 下一个打包即将下载中... SET 下一个打包下载完成,准备就绪...

‘success’ | ‘error’ | ‘pending’ | ‘downloading’

‘background’ | ‘kill’ | ‘nativeVersion’ | ‘date’

从功能和设置继续

从功能和设置继续

如果您正在使用 功能和设置 来规划仪表板和API操作,连接它到 使用@capgo/capacitor-updater 使用@capgo/capacitor-updater API概述 API概述 介绍 介绍 API 键 为 API 键的实现细节提供键值对, 设备 为设备的实现细节提供键值对,