안내서
__CAPGO_KEEP_0__에 대한 튜토리얼
capgo/capacitor-appinsights를 사용하는 방법
__CAPGO_KEEP_0__를 위한 wrapper https://github.com/apptopia/appinsights SDK
설치
bun add @capgo/capacitor-appinsights
bunx cap sync
이 플러그인에서 제공하는 것
init- SDK를 초기화하는 방법setUserId- 초기화 후 사용자 ID를 설정하거나 업데이트하세요.getState- SDK의 현재 상태를 가져오세요.
예시 사용
init
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를 설정하거나 업데이트하세요.
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.setUserId({} as { userId: string });
getState
- SDK의 현재 상태를 가져오세요.
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.getState();
전체 참조
- GitHub: https://github.com/Cap-go/capacitor-appinsights/
- 문서: /docs/plugins/appinsights/