Einstieg
Einen Setup-Prompt mit den Installationsanweisungen und der vollständigen Markdown-Dokumentation für diesen Plugin kopieren.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-appinsights`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/appinsights/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Installieren
Abschnitt: Installierenbun add @capgo/capacitor-appinsightsbunx cap syncImportieren
Abschnitt: Importierenimport { CapacitorAppInsights } from '@capgo/capacitor-appinsights';API Übersicht
Abschnitt: API Übersichtinit
Abschnitt: initDie AppInsights-Einstellung für SDK initialisieren
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.init({} as { partnerId: string; // Provided by our business unit partnerKey: string; // Provided by our business unit });setUserId
Abschnitt mit dem Titel “setUserId”Setzen oder aktualisieren Sie die Benutzer-ID nach der Initialisierung
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.setUserId({} as { userId: string });Ermitteln Sie den aktuellen Zustand von SDK
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.getState();Typenverweis
Abschnitt mit dem Titel “Typenverweis”PanelSDKState
Abschnitt mit dem Titel “PanelSDKState”export interface PanelSDKState { initCompleted: boolean; // SDK initialization status jobScheduled: boolean; // Background job scheduling status permissionAcquired: boolean; // Required permissions status}Quellwahrheit
Abschnitt mit dem Titel “Quellwahrheit”Diese Seite wurde aus dem Plugin generiert. src/definitions.tsRe-run die Synchronisation, wenn die öffentliche API upstream geändert wird.