시작하기
설치 단계와 이 플러그인에 대한 전체 마크다운 가이드를 포함한 설정 지시를 복사하십시오.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-intercom`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/intercom/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 제목bun add @capgo/capacitor-intercombunx cap sync수입
수입 제목import { CapgoIntercom } from '@capgo/capacitor-intercom';API 개요
API 개요 제목loadWithKeys
__CAPGO_KEEP_0__ 로드API 키를 런타임에 초기화하여 Intercom을 초기화합니다. capacitor.config에서 키를 구성하지 않아도 됩니다.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);registerIdentifiedUser
__CAPGO_KEEP_0__ 사용자 등록__CAPGO_KEEP_0__ 사용자 ID 또는 이메일 중 하나 이상을 제공해야 합니다.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
__CAPGO_KEEP_0__ 익명 사용자 등록클립보드 복사
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();updateUser
updateUser 섹션 제목Intercom에서 사용자 속성을 업데이트합니다.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);logout
logout 섹션 제목Intercom에서 사용자를 로그아웃합니다.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();logEvent
logEvent 섹션 제목Intercom에서 사용자 정의 이벤트를 로깅합니다.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);displayMessenger
displayMessenger 섹션 제목Intercom 메신저를 열어주세요.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();displayMessageComposer
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessageComposer({} as IntercomMessageComposerOptions);displayHelpCenter
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();hideMessenger
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();displayLauncher
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();hideLauncher
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();displayInAppMessages
__CAPGO_KEEP_3____CAPGO_KEEP_4__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
__CAPGO_KEEP_6____CAPGO_KEEP_7__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
__CAPGO_KEEP_9____CAPGO_KEEP_10__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);displayArticle
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);displaySurvey
__CAPGO_KEEP_3____CAPGO_KEEP_4__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);setUserHash
__CAPGO_KEEP_6____CAPGO_KEEP_7__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);setUserJwt
__CAPGO_KEEP_9____CAPGO_KEEP_10__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);setBottomPadding
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setBottomPadding({} as IntercomBottomPaddingOptions);sendPushTokenToIntercom
__CAPGO_KEEP_3____CAPGO_KEEP_4__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);receivePush
__CAPGO_KEEP_6____CAPGO_KEEP_7__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);getUnreadConversationCount
__CAPGO_KEEP_9____CAPGO_KEEP_10__
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();타입 참조
타입 참조 섹션IntercomLoadOptions
IntercomLoadOptionsexport interface IntercomLoadOptions { appId?: string; apiKeyIOS?: string; apiKeyAndroid?: string;}IntercomIdentifiedUserOptions
IntercomIdentifiedUserOptionsexport interface IntercomIdentifiedUserOptions { userId?: string; email?: string;}IntercomUserUpdateOptions
IntercomUserUpdateOptionsexport interface IntercomUserUpdateOptions { userId?: string; email?: string; name?: string; phone?: string; languageOverride?: string; customAttributes?: { [key: string]: any }; companies?: IntercomCompany[];}IntercomLogEventOptions
IntercomLogEventOptionsexport interface IntercomLogEventOptions { name: string; data?: { [key: string]: any };}IntercomMessageComposerOptions
IntercomMessageComposerOptionsexport interface IntercomMessageComposerOptions { message: string;}IntercomCarouselOptions
IntercomCarouselOptions 섹션 제목export interface IntercomCarouselOptions { carouselId: string;}IntercomArticleOptions
IntercomArticleOptions 섹션 제목export interface IntercomArticleOptions { articleId: string;}IntercomSurveyOptions
IntercomSurveyOptions 섹션 제목export interface IntercomSurveyOptions { surveyId: string;}IntercomUserHashOptions
IntercomUserHashOptions 섹션 제목export interface IntercomUserHashOptions { hmac: string;}IntercomUserJwtOptions
IntercomUserJwtOptions 섹션 제목export interface IntercomUserJwtOptions { jwt: string;}IntercomBottomPaddingOptions
IntercomBottomPaddingOptions 섹션 제목export interface IntercomBottomPaddingOptions { value: number;}IntercomPushTokenOptions
IntercomPushTokenOptions 섹션export interface IntercomPushTokenOptions { value: string;}실질적인 출처
실질적인 출처 섹션이 페이지는 플러그인의 src/definitions.ts공개 API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.