Zum Hauptinhalt springen
Zurück zu Plugins
@capgo/capacitor-Updater
Tutorial
von github.com/Cap-go

Updater

Deployen Sie live aktualisierte Inhalte sofort an Ihre Benutzer ohne Wartezeit durch App-Store-Überprüfungen

Richtlinie

Tutorial zum Updater

Mit @capgo/capacitor-updater arbeiten

Live-Update für capacitor-Apps.

Installieren

bun add @capgo/capacitor-updater
bunx cap sync

Was diese Erweiterung offenlegt

  • notifyAppReady - Melden Sie dem native Layer, dass JavaScript erfolgreich initialisiert wurde.
  • setUpdateUrl - Legen Sie die Update-URL für die App dynamisch bei Laufzeit fest.
  • setStatsUrl - Setze die Statistik-URL für die App dynamisch bei Laufzeit.
  • setChannelUrl - Setze die Kanal-URL für die App dynamisch bei Laufzeit.

Beispielanwendung

notifyAppReady

Benachrichtige die native Layer, dass JavaScript erfolgreich initialisiert wurde.

import { CapacitorUpdater } from '@capgo/capacitor-updater';

await CapacitorUpdater.notifyAppReady();

setUpdateUrl

Setze die Update-URL für die App dynamisch bei Laufzeit.

import { CapacitorUpdater } from '@capgo/capacitor-updater';

await CapacitorUpdater.setUpdateUrl({} as UpdateUrl);

setStatsUrl

- Setze die Statistik-URL für die App dynamisch bei Laufzeit.

import { CapacitorUpdater } from '@capgo/capacitor-updater';

await CapacitorUpdater.setStatsUrl({} as StatsUrl);

setChannelUrl

- Setze die Kanal-URL für die App dynamisch bei Laufzeit.

import { CapacitorUpdater } from '@capgo/capacitor-updater';

await CapacitorUpdater.setChannelUrl({} as ChannelUrl);

Vollständige Referenz