コンテンツにジャンプ

__CAPGO_KEEP_1__

Add this to your capacitor.config.json, to disable auto-update.

// capacitor.config.json
{
"appId": "**.***.**",
"appName": "Name",
"plugins": {
"CapacitorUpdater": {
"autoUpdate": "off",
}
}
}

You can use this example or re-create the logic in your app.

import { CapacitorUpdater } from '@capgo/capacitor-updater'
import { SplashScreen } from '@capacitor/splash-screen'
import { App } from '@capacitor/app'
let data = {version: ""}
CapacitorUpdater.notifyAppReady()
App.addListener('appStateChange', async(state) => {
if (state.isActive) {
// Do the download during user active app time to prevent failed download
data = await CapacitorUpdater.download({
version: '0.0.4',
url: 'https://github.com/Cap-go/demo-app/releases/download/0.0.4/dist.zip',
})
}
if (!state.isActive && data.version !== "") {
// Do the switch when user leave app
SplashScreen.show()
try {
await CapacitorUpdater.set(data)
} catch (err) {
console.log(err)
SplashScreen.hide() // in case the set fail, otherwise the new app will have to hide it
}
}
})

マニュアルアップデートから続ける

マニュアルアップデートから続ける

マニュアルアップデートを使用している場合 マニュアルアップデート マイグレーションとエンタープライズオペレーションの計画と実行に使用する場合、 Cloudflareの@capgo/capacitor-updater Cloudflareの@capgo/capacitor-updater Capgo Enterprise for the product workflow in Capgo Enterprise, __CAPGO_KEEP_0__ Alternatives __CAPGO_KEEP_0__ Enterprise Capgo Alternatives for the product workflow in Capgo Alternatives, and Capgo コンサルティング Capgo コンサルティング