跳过内容

14 天的无限免费试用,不需要信用卡

GitHub

查看Github README 更多信息。

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

属性类型Description描述默认值
appReadyTimeoutnumber自10000 // (10 seconds)
responseTimeoutnumber配置原生插件在等待API超时之前等待的毫秒数。可用于Android、iOS和Electron。20000 // (20 seconds)
autoDeleteFailedboolean配置native插件在考虑__CAPGO_KEEP_0__超时之前等待的毫秒数。可用于Android、iOS和Electron。true
autoDeletePreviousboolean配置插件是否自动删除失败的包。可用于Android、iOS和Electron。true
autoUpdateboolean | ‘off’ | ‘atBackground’ | ‘atInstall’ | ‘onLaunch’ | ‘always’ | ‘onlyDownload’通过更新服务器配置插件如何使用自动更新。 true 与“atBackground”相同,false 与“off”相同。 - off:禁用自动更新 - atBackground:在应用程序切换到后台时自动检查和下载,然后在应用程序切换到后台时应用 - atInstall:仅在新安装或原生应用程序更新后立即应用,否则使用 atBackground - onLaunch:在应用程序启动时立即应用,否则在启动检查后使用 atBackground - always:在自动更新运行时立即应用 - onlyDownload:自动检查和下载,发出 updateAvailable,永远不会自动设置下一个捆绑包。 立即应用模式(“atInstall”,“onLaunch”,“always”)应上传 —delta 以避免更新延迟用户体验。 在 Android 和 iOS 上,需要设置 autoSplashscreen: true 和 @capacitor/splash-screen 以及 launchAutoHide: false。 可用于 Android、iOS 和 Electron。“atBackground” // true is still accepted
resetWhenUpdateboolean自动删除设备上安装的新版本原生应用程序捆绑包时下载的以前捆绑包。 可用于 Android、iOS 和 Electron。true
updateUrlstring配置更新检查发送到的 URL / 端点。 可用于 Android、iOS 和 Electron。https://plugin.capgo.app/updates
channelUrlstring配置用于频道操作的 URL / 端点。 可用于 Android、iOS 和 Electron。https://plugin.capgo.app/channel_self
statsUrlstring配置更新统计信息发送到的 URL / 端点。 可用于 Android、iOS 和 Electron。 将其设置为 "" 以禁用统计信息报告。https://plugin.capgo.app/stats
publicKeystring配置终端到终端live update加密的公钥。版本 2。可用于 Android、iOS 和 Electron。undefined6.2.0
versionstring配置应用程序的当前版本。该版本将用于第一次更新请求。如果未设置,插件将从原生code获取版本。可用于 Android、iOS 和 Electron。undefined4.17.48
directUpdateboolean | ‘always’ | ‘atInstall’ | ‘onLaunch’已弃用。请使用“atInstall”,“onLaunch”或“always”模式代替:autoUpdate。该选项仍支持现有应用程序。立即应用应上传 —delta 以避免更新时用户体验受影响。在 Android 和 iOS 上,这些模式需要 autoSplashscreen:true 和 @capacitor/splash-screen 的 launchAutoHide:false。- false:永不进行直接更新- atInstall:与 autoUpdate:“atInstall”相同- onLaunch:与 autoUpdate:“onLaunch”相同- always:与 autoUpdate:“always”相同- true:与“always”相同,用于向后兼容。可用于 Android、iOS 和 Electron。false5.1.0
autoSplashscreenboolean在使用“atInstall”,“onLaunch”或“always”模式(包括已弃用的直接更新值)时必需,包括 @capacitor/splash-screen 必须已安装并配置为 launchAutoHide:false。启用后,插件在应用程序更新后或无需更新时隐藏启动屏幕。从而避免手动监听 appReady 事件并调用 SplashScreen.hide()。可用于 Android 和 iOS。false7.6.0
periodCheckDelaynumberConfigure the delay period for period update check. the unit is in seconds. Available on Android, iOS, and Electron. Cannot be less than 600 seconds (10 minutes).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>

参数

类型描述Description
optionsUpdateUrl用于检查更新的 URL。

自从: 5.4.0


setStatsUrl(…)

setStatsUrl(…)部分
setStatsUrl(options: StatsUrl) => Promise<void>

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

参数类型Description
optionsStatsUrl描述

自从: 5.4.0


用于发送统计数据的 URL。

Section titled “设置频道URL(…)”
setChannelUrl(options: ChannelUrl) => Promise<void>

设置应用程序的频道URL,这将用于设置频道。

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

自: 5.4.0


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

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

参数类型关于Capgo页面
optionsDownloadOptions描述 下载选项下载新包zip文件的选项

返回值 Promise<BundleInfo>


下一个(…)

下一个(…)
next(options: BundleId) => Promise<BundleInfo>

设置下一次重载应用时使用的包

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

返回: Promise<BundleInfo>


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

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

参数类型描述
optionsBundleIdA {@link} BundleId} 对象,包含要设置为当前的新包 ID。

delete(…)

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

从本机应用程序存储中删除指定的包。使用 {@link list} 来获取存储的 Bundle IDs。

ParamType描述
optionsBundleIdA {@link} BundleId{object containing the ID of a bundle to delete (note, this is the bundle id, NOT the version name)}

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

获取本地下载的所有包

参数类型关于Capgo页面
optionsListOptions描述 用于列出包的 {@link}ListOptions

返回: Promise<BundleListResult>


reset(…)

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

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

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

current()

current()
current() => Promise<CurrentBundleResult>

获取当前的包,如果没有设置则返回 builtincurrentNative是设备上安装的原始包

返回: Promise<CurrentBundleResult>


reload()

reload()
reload() => Promise<void>

重新加载视图


setMultiDelay(…)

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

设置一个延迟条件数组 延迟条件} array containing conditions that the Plugin will use to delay the update. After all conditions are met, the update process will run start again as usual, so update will be installed after a backgrounding or killing the app. For the date 延迟条件 background kind,值应为以毫秒为单位的数字。 对于 nativeVersion 延迟条件 kill kind, the value is not used. The function has inconsistent behavior the option kill do 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.

延迟条件Type延迟条件
optionsMultiDelayConditions参数类型 多阶段条件设置多阶段条件的数组

自 4.3.0


取消延迟()

取消延迟()
cancelDelay() => Promise<void>

取消延迟条件 取消延迟条件获取最新(…)

自 4.0.0


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

从更新 URL 获取最新的包

参数类型
optionsGetLatestOptions

Returns: Promise<LatestVersion>

返回: 4.0.0


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

标题:setChannel(…) allow_device_self_set 设置此设备的插件管理的本地频道。频道必须

setChannel() validates the channel with the backend, then stores the selected channel locally on the device. It does not create or update a backend Device Override, so the device will not appear as overridden in the Capgo dashboard. Only assignments created from the dashboard or the Public API are shown in the Device Override UI.

注意事项:

  • 请勿在启动时使用此方法设置频道。应在应用程序准备就绪并用户已交互(例如,选择 beta 版本)时使用。 defaultChannel in your Capacitor config instead.
  • 公共频道无法自行分配。
  • 如果频道被标记为 ,调用 public将返回错误。要使用公共频道,请调用 setChannel() ,设备将自动切换到匹配的公共频道。 unsetChannel() 使用
  • Use listChannels() 参数
Param类型描述
optionsSetChannelOptions是设置 {@link 设置频道选项}频道

返回: Promise<ChannelRes>

自 4.7.0


unsetChannel(options: UnsetChannelOptions) => Promise<void>

清除本地设备的插件管理的频道设置。仅清除本地存储的频道设置,不删除仪表盘或公共 __CAPGO_KEEP_0__ 设备覆盖记录。 setChannel(); 不会删除仪表板或公共API设备Override记录。

在调用此方法后,正常渠道顺序适用:已有的仪表板或公共API设备覆盖仍然有效;否则,设备可以回退到匹配公共/默认渠道的条件(平台、设备类型、构建类型)。

此功能有用在以下情况:

  • 您想将设备移回默认更新轨道
  • 您想使用公共渠道(由于公共渠道无法自行分配) setChannel())
参数类型
optionsUnsetChannelOptions

Since: 4.7.0


自从:

getChannel()
getChannel() => Promise<GetChannelRes>

获取此设备的渠道

返回: Promise<GetChannelRes>

自从: 4.8.0


listChannels()

listChannels()
listChannels() => Promise<ListChannelsResult>

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

每个频道结果中都包括:

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

返回: Promise<ListChannelsResult>

自从: 7.5.0


setCustomId(options: SetCustomIdOptions) => Promise<void>

为设备设置自定义 ID

参数类型描述
optionsSetCustomIdOptions是 {@link SetCustomIdOptions} 自定义 ID 设置

自 4.9.0


获取内置版本()

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

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

返回: Promise<BuiltinVersion>

自 5.2.0


获取设备 ID()

获取设备 ID
getDeviceId() => Promise<DeviceId>

获取设备唯一标识(用于自动更新服务器)

Returns: Promise<DeviceId>


getPluginVersion()

获取插件版本
getPluginVersion() => Promise<PluginVersion>

获取本地Capacitor Updater插件版本(用于自动更新服务器)

Returns: Promise<PluginVersion>


isAutoUpdateEnabled()

是否自动更新可用
isAutoUpdateEnabled() => Promise<AutoUpdateEnabled>

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

返回值: Promise<AutoUpdateEnabled>


removeAllListeners()

标题:removeAllListeners()
removeAllListeners() => Promise<void>

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

自: 1.0.0


addListener('download', …)

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

监听应用程序中bundle下载事件。下载开始时、下载中以及下载完成时触发一次。 此事件将返回下载百分比。

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

返回: Promise<PluginListenerHandle>

自: 2.0.11


添加监听器(‘无需更新’,…)

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

监听无需更新事件,适用于每次启动应用时强制检查更新

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

返回: Promise<PluginListenerHandle>

自: 4.0.0


添加监听器(‘更新可用’,…)

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

监听可用更新事件,适用于每次启动应用程序时强制检查

参数类型
eventName‘updateAvailable’
listenerFunc(state: UpdateAvailableEvent) => void

Returns: Promise<PluginListenerHandle>

返回: 4.0.0


addListener(eventName: 'downloadComplete', listenerFunc: (state: DownloadCompleteEvent) => void) => Promise<PluginListenerHandle>

监听下载完成事件

参数类型
eventName‘downloadComplete’
listenerFunc(state: DownloadCompleteEvent) => void

返回: Promise<PluginListenerHandle>

自: 4.0.0


添加监听器(majorAvailable,…)

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

在 App 中监听 Major 更新事件,让你知道当 Major 更新被禁用时会被阻止

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

返回: Promise<PluginListenerHandle>

自: 2.3.0


addListener(eventName: 'updateFailed', listenerFunc: (state: UpdateFailedEvent) => void) => Promise<PluginListenerHandle>

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

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

返回值: Promise<PluginListenerHandle>

自: 2.3.0


添加监听器(‘downloadFailed’,…)”标题

在 App 中监听下载失败事件,让你知道某个 Bundle 下载失败
addListener(eventName: 'downloadFailed', listenerFunc: (state: DownloadFailedEvent) => void) => Promise<PluginListenerHandle>

Param

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

返回: Promise<PluginListenerHandle>

自: 4.0.0


添加监听器(‘appReloaded’,…)

添加监听器(‘appReloaded’,…)
addListener(eventName: 'appReloaded', listenerFunc: () => void) => Promise<PluginListenerHandle>

监听 App 重载事件,让你知道 App 已经重新加载

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

返回: Promise<PluginListenerHandle>

自: 4.3.0


添加监听器(‘appReady’,…)

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

在 App 中监听 app ready 事件,让你知道 app 已经准备好使用

参数类型
eventName‘appReady’
listenerFunc(state: AppReadyEvent) => void

Returns: Promise<PluginListenerHandle>

返回: 5.1.0


isAutoUpdateAvailable() => Promise<AutoUpdateAvailable>

标题:isAutoUpdateAvailable()方法

Returns: Promise<AutoUpdateAvailable>


getNextBundle()

getNextBundle()
getNextBundle() => Promise<BundleInfo | null>

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

返回: Promise<BundleInfo | null>

自: 6.8.0


setShakeMenu(…)

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

启用或禁用用于调试/测试目的的摇摆菜单

参数类型功能描述
optionsSetShakeMenuOptions包含一个布尔值来启用或禁用抖动菜单

自: 7.5.0


isShakeMenuEnabled()

标题:isShakeMenuEnabled()
isShakeMenuEnabled() => Promise<ShakeMenuEnabled>

获取抖动菜单的当前状态

返回: Promise<ShakeMenuEnabled>

自: 7.5.0


AppReadyResult

AppReadyResult
属性类型
bundleBundleInfo

关于Capgo

BundleInfo
属性类型
idstring
versionstring
downloadedstring
checksumstring
statusBundleStatus

BundleInfo

更新地址
属性类型
urlstring

统计地址

StatsUrl
属性类型
urlstring

context:Capgo主页

频道URL
属性类型
urlstring

DownloadOptions

下载选项

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.

属性类型简介默认自
urlstring要下载的捆绑包 zip 文件的 URL (例如:dist.zip)。 (这可以是任何 URL。 例如:Amazon S3,一个 GitHub 标签,任何您托管的捆绑包的其他地方。)
versionstring捆绑包的版本 code/名称
sessionKeystring更新的会话密钥,当捆绑包使用会话密钥加密时undefined4.0.0
checksumstring更新的校验和,应为 sha256 并使用私钥加密,如果捆绑包加密undefined4.0.0
manifestManifestEntry[]Delta (manifest) 多文件下载的清单undefined6.1.0

清单条目

关于清单条目
属性类型
file_namestring | null
file_hashstring | null
download_urlstring | null

BundleId

BundleId
Prop类型
idstring

BundleListResult

BundleListResult
Prop类型
bundlesBundleInfo[]

ListOptions

ListOptions
Prop类型简介默认自
rawboolean是否返回原始包列表或清单。如果为真,列表将尝试读取内部数据库而不是磁盘上的文件。false6.14.0

重置选项

重置选项
属性类型
toLastSuccessfulboolean

当前包结果

当前包结果
属性类型
bundleBundleInfo
nativestring

多阶段条件

多阶段条件
属性类型
delayConditionsDelayCondition[]

延迟条件

延迟条件
属性类型描述
kindDelayUntilNext设置延迟条件
valuestring

最新版本

最新版本
属性类型关于Capgo页面描述
versionstring自4.0.0
checksumstring6
majorboolean
messagestring
sessionKeystring
errorstring
oldstring
urlstring
manifestManifestEntry[]6.1

获取最新版本的结果

获取最新版本选项
属性类型关于Capgo页面获取最新版本选项部分描述
channelstring获取最新版本的频道undefined6.8.0

ChannelRes

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

SetChannelOptions

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

获取频道信息

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

ListChannelsResult

ListChannelsResult
属性类型描述自
channelsChannelInfo[]可用渠道列表7.5.0

ChannelInfo

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

频道命令使用频道 name,而不是此数字 id.

设置自定义 ID 选项

设置自定义 ID 选项
属性类型
customIdstring

__CAPGO_KEEP_0__

内置版本
Prop类型
versionstring

__CAPGO_KEEP_0__

设备ID
Prop类型
deviceIdstring

__CAPGO_KEEP_1__

插件版本
Prop类型
versionstring

自动更新开关

自动更新开关
属性类型
enabledboolean
属性类型
remove() => Promise<void>

下载事件

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

无需事件

无需事件
属性类型概述自
bundleBundleInfo下载进度,范围为0到100。4.0.0

更新可用事件

关于Capgo页面
属性类型关于Capgo描述
bundleBundleInfo自4.0.0

下载进度,范围为0到100

下载完成事件
属性类型关于Capgo描述
bundleBundleInfo下载完成事件4.0.0
属性类型描述自
versionstring当有新主要包可用时触发4.0.0
属性类型描述自从
bundleBundleInfo安装更新失败时触发。4.0.0

下载失败事件

下载失败事件
属性类型关于Capgo页面自从
versionstring安装下载失败时触发。4.0.0

应用就绪事件

应用就绪事件
属性类型描述自
bundleBundleInfo应用程序准备就绪时发出。5.2.0
statusstring

自动更新可用

自动更新可用
属性类型
availableboolean

设置抖动菜单选项

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

ShakeMenuEnabled

关于 ShakeMenuEnabled
属性类型
enabledboolean

类型别名

关于类型别名

BundleStatus

Bundle状态

等待:该捆绑包正在等待下一个捆绑包的准备 设置 正在下载:该捆绑包正在下载中 成功:该捆绑包已下载并准备好 设置 作为下一个捆绑包。 错误:捆绑包下载失败。

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

延迟到下一个

标题:延迟到下一个

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

继续从功能和设置

标题:继续从功能和设置

如果您正在使用 功能和设置 来规划仪表板和API操作,连接它到 使用@capgo/capacitor-updater 为native能力在使用@capgo/capacitor-updater API概述 为实现细节在API概述 简介 为简介中的实现细节 API 键 为API Keys中的实现细节,并 设备 为设备的实现细节。