はじめに
このプラグインのインストール手順と完全なマークダウンガイドを含む設定用質問をコピーする。
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.
インストール
インストールbun add @capgo/capacitor-appinsightsbunx cap syncインポート
インポートimport { CapacitorAppInsights } from '@capgo/capacitor-appinsights';APIの概要
APIの概要SDKのAppInsightsの初期化
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
ユーザーIDを設定する初期化後、ユーザーIDを設定または更新します
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.setUserId({} as { userId: string });getState
セクション「__CAPGO_KEEP_0__の現在の状態を取得」Get the current state of the SDK
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.getState();タイプ リファレンス
パネル SDK ステートPanelSDKState
クリップボードにコピーexport interface PanelSDKState { initCompleted: boolean; // SDK initialization status jobScheduled: boolean; // Background job scheduling status permissionAcquired: boolean; // Required permissions status}真実の源
Type Referenceこのページはプラグインから生成されています。 src/definitions.tsパブリック API がアップストリームで変更された場合、再度同期を実行してください。