내용으로 건너뛰기

Getting Started

GitHub

AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. 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';

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 });

현재 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 upstream에서 변경되면.

이 플러그인을 사용 중이라면 Getting Started 계획 대시보드 및 API 작업을 위해 Using @capgo/capacitor-appinsights Using @capgo/capacitor-appinsights for the native capability in Using @API/__CAPGO_KEEP_1__-appinsights for the implementation detail in API Overview Introduction implementation에 대한 세부 정보를 Introduction에서 참조하세요. API 키 implementation에 대한 세부 정보를 API 키에서 참조하세요. 장치 implementation에 대한 세부 정보를 장치에서 참조하세요.