수동 업데이트
Configuration
Ajoutez ceci à votre capacitorconfigjson, pour désactiver la mise à jour automatique
// capacitorconfigjson{  "appId": "*******",  "appName": "Name",  "plugins": {    "CapacitorUpdater": {      "autoUpdate": false,    }  }}Utilisation
Vous pouvez utiliser cet exemple ou recréer la logique dans votre application
import { CapacitorUpdater } from '@capgo/capacitor-updater'import { SplashScreen } from '@capacitor/splash-screen'import { App } from '@capacitor/app'let data = {version: ""}CapacitorUpdater.notifyAppReady()AppaddListener('appStateChange', async(state) => {     if (stateisActive) {       // Do the download during user active app time to prevent failed download       data = await CapacitorUpdaterdownload({       version: '004',       url: 'https://github.com/Cap-go/demo-app/releases/download/004/distzip',       })     }     if (!stateisActive && dataversion !== "") {       // Do the switch when user leave app       SplashScreenshow()       try {         await CapacitorUpdaterset(data)       } catch (err) {         consolelog(err)         SplashScreenhide() // in case the set fail, otherwise the new app will have to hide it       }     } })