Update Manual
Copy prompt pengaturan dengan langkah instalasi dan panduan markdown lengkap untuk plugin ini.
Konfigurasi
Bab berjudul โKonfigurasiโTambahkan ini ke aplikasi Anda capacitor.config.json, untuk menonaktifkan pembaruan otomatis.
// capacitor.config.json{ "appId": "**.***.**", "appName": "Name", "plugins": { "CapacitorUpdater": { "autoUpdate": "off", } }}Penggunaan
Bab berjudul โPenggunaanโAnda dapat menggunakan contoh ini atau mere-creat logika di aplikasi Anda.
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 } } })Teruskan dari Update Manual
Judul Bagian โTeruskan dari Update ManualโJika Anda menggunakan Update Manual untuk merencanakan migrasi dan operasi bisnis, hubungkannya dengan Menggunakan @capgo/capacitor-updater untuk kemampuan asli di Menggunakan @capgo/capacitor-updater, Capgo Enterprise for the product workflow in Capgo Enterprise, untuk alur kerja produk di __CAPGO_KEEP_0__ Enterprise, Alternatif Plugin Bisnis Ionic untuk alur kerja produk di Alternatif Plugin Bisnis Ionic, dan Capgo Alternatif untuk alur kerja produk di Capgo Alternatif, dan Capgo Konsultasi untuk alur kerja produk di Capgo Konsultasi.