メインコンテンツにスキップ

Getting Started

GitHub

CapgoのAIアシストセットアップを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。

ターミナル画面
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

次に、以下のプロンプトを使用してください。

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-appinsights` plugin in my project.

Manual Setupを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。

ターミナル画面
bun add @capgo/capacitor-appinsights
bunx cap sync
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';

アプリインサイトの SDK を初期化する

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();
export interface PanelSDKState {
initCompleted: boolean; // SDK initialization status
jobScheduled: boolean; // Background job scheduling status
permissionAcquired: boolean; // Required permissions status
}

このページはプラグインの設定から生成されています。 src/definitions.ts公開 API のアップストリーム変更時に再度同期を実行してください。

Getting Started から続けてください

「Getting Started」から続けてください

あなたが「を使用している場合 Getting Started ダッシュボードとAPIの作業を計画するには、を接続してください native capabilityのために@capgo/capacitor-appinsightsを使用 native capabilityのために@capgo/capacitor-appinsightsを使用する場合 APIの概要 APIの実装詳細について 概要 概要の実装詳細について APIのキー APIのキーに関する実装詳細について デバイス 実装詳細のデバイスについて