가이드
How to use AppInsights in Capacitor
@capgo/capacitor-appinsights를 사용합니다.
AppInsights의 wrapper입니다. https://github.com/apptopia/appinsights SDK.
설치
bun add @capgo/capacitor-appinsights
bunx cap sync
bunx cap sync 플러그인의 네이티브 code을 프로젝트에 복사합니다. 플러그인 업그레이드 후 다시 실행하세요.
import
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
API를 한눈에
| 방법 | 설명 |
|---|---|
init |
AppInsights SDK을 초기화합니다. |
setUserId |
초기화 후 사용자 ID를 설정하거나 업데이트하세요. |
getState |
SDK의 현재 상태를 가져오세요. |
예시
init()
AppInsights SDK을 초기화하세요.
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.init({
partnerId: 'partner-id-123',
partnerKey: 'partner-key-123',
});
setUserId()
초기화 후 사용자 ID를 설정하거나 업데이트하세요.
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.setUserId({ userId: 'user-id-123' });
getState()
SDK의 현재 상태를 가져오세요.
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
const result = await CapacitorAppInsights.getState();
console.log(result);
전체 참조
Using @capgo/capacitor-appinsights에서 계속하세요.
Capgo를 사용 중이라면 @capgo/capacitor-앱인사이트 Capacitor-앱인사이트스 @capgo/capacitor-appinsights @capgo/capacitor-appinsights Getting Started Capacitor 플러그인 디렉토리 Capgo 플러그인 디렉토리 Capgo 제품 워크플로우에 대한 플러그인 디렉토리에서 Capacitor Plugins by Capgo Capacitor 플러그인에 대한 구현 세부 사항은 Capgo에 의해 제공됩니다. Capacitor 플러그인 추가 또는 업데이트 Capacitor 플러그인 추가 또는 업데이트