컨텐츠로 바로가기

시작하기

터미널 창
bun add @capgo/capacitor-appinsights
bunx cap sync
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';

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

setUserId

Capgo 초기화 후 사용자 ID를 설정하거나 업데이트하세요.

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

getState

getState

현재 SDK 상태를 가져오세요.

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

Type Reference

Type Reference

PanelSDKState

PanelSDKState
export interface PanelSDKState {
initCompleted: boolean; // SDK initialization status
jobScheduled: boolean; // Background job scheduling status
permissionAcquired: boolean; // Required permissions status
}

실질적인 출처

실질적인 출처

이 페이지는 플러그인의 src/definitions.ts. upstream에서 public API가 변경되었을 때 다시 싱크를 실행하세요.