Skip to content

はじめに

インストール

インストール
ターミナル画面
bun add @capgo/capacitor-appinsights
bunx 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
});

初期化後、ユーザーIDを設定または更新します

import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.setUserId({} as { userId: string });

Get the current state of the SDK

import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.getState();

タイプ リファレンス

パネル SDK ステート
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 がアップストリームで変更された場合、再度同期を実行してください。