메인 콘텐츠로 건너뛰기
@capgo/capacitor-intercom 커뮤니케이션 오픈 소스

인터콤 Capacitor 플러그인

Capacitor 앱에 인터콤 라이브 채팅, 도움말 센터 및 지원 워크플로를 통합합니다

설치

bun add @capgo/capacitor-intercom bunx cap sync
npm, pnpm 또는 yarn
  • npm install @capgo/capacitor-intercom
  • pnpm add @capgo/capacitor-intercom
  • yarn add @capgo/capacitor-intercom

인터콤 사용 방법

How to use Intercom in Capacitor

__CAPGO_KEEP_0__ 앱을 다운로드하고 QR __CAPGO_KEEP_1__을 스캔하세요.

다운로드하여 Capgo 앱, 그리고 QR code 코드를 스캔하세요.

인터콤 플러그인 미리보기 QR code

@capgo/capacitor-intercom을 사용합니다.

Capacitor 인터콤 플러그인.

설치

bun add @capgo/capacitor-intercom
bunx cap sync

bunx cap sync code의 네이티브 코드를 프로젝트에 복사합니다. 플러그인 업그레이드 후 다시 실행하세요.

수입

import { CapgoIntercom } from '@capgo/capacitor-intercom';

API의 개요

방법 설명
loadWithKeys 실시간에서 API 키를 초기화하세요. capacitor.config에서 키를 구성하지 않으려면 이 옵션을 사용하세요.
registerIdentifiedUser Intercom에 알려진 사용자를 등록하세요. userId 또는 email 중 하나가 제공되어야 합니다.
registerUnidentifiedUser Intercom에 익명 사용자를 등록하세요.
updateUser Intercom에서 사용자 속성을 업데이트하세요.
logout Intercom에서 사용자를 로그아웃하세요.
logEvent Intercom에서 사용자 이벤트를 로그하세요.
displayMessenger Intercom 메신저를 열세요.
displayMessageComposer 기본 메시지를 미리 채워진 채로 메시지 작성을 열세요.
displayHelpCenter Intercom 도움말 센터를 열세요.
hideMessenger Intercom 메신저를 숨기세요.
displayLauncher Intercom 런처 버튼을 표시하세요.
hideLauncher Intercom 런처 버튼을 숨기세요.
displayInAppMessages Intercom 앱 메시지 활성화.
hideInAppMessages Intercom 앱 메시지 비활성화.
displayCarousel 특정 Intercom 카러셀 표시.
displayArticle 특정 Intercom 기사 표시.
displaySurvey 특정 Intercom 설문 조사 표시.
setUserHash 사용자 식별성을 확인하기 위한 HMAC 설정.
setUserJwt 안전한 메신저 인증을 위한 JWT 설정.
setBottomPadding Intercom 메신저 UI의 하단 패딩 설정.
sendPushTokenToIntercom Intercom에 푸시 알림 토큰 전송.
receivePush 받은 Intercom 푸시 알림 처리.
getUnreadConversationCount 현재 사용자의 읽지 않은 대화 수 가져오기.

예시

loadWithKeys()

API 키를 런타임에 초기화하세요. capacitor.config에서 키를 구성하지 않으려면 이 옵션을 사용하세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.loadWithKeys({
  appId: 'app-id-123',
  apiKeyIOS: 'api-key-ios',
  apiKeyAndroid: 'api-key-android',
});

registerIdentifiedUser()

Intercom에 알려진 사용자를 등록하세요. userId 또는 email 중 하나 이상을 제공해야 합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.registerIdentifiedUser({
  userId: 'user-id-123',
  email: 'user@example.com',
});

registerUnidentifiedUser()

Intercom에 익명 사용자를 등록하세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.registerUnidentifiedUser();

updateUser()

Intercom에서 사용자 속성을 업데이트하세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.updateUser({ userId: 'user-id-123' });

logout()

Intercom에서 사용자를 로그아웃하세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.logout();

logEvent()

Intercom에서 사용자 정의 이벤트를 로그하세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.logEvent({ name: 'example' });

위 표에는 23 개의 핵심 메서드가 나열되어 있습니다. 리스너 및 버전 헬퍼, 각 메서드의 전체 계약은 __CAPGO_KEEP_0__ 저장소에서 문서화되어 있습니다. GitHub 저장소.

__CAPGO_KEEP_0__ 저장소

addListener 리스너를 해제합니다. 화면이 언마운트되거나, 또는 모든 리스너를 해제하려면 이 메서드를 호출하세요. handle.remove() __CAPGO_KEEP_0__ CapgoIntercom.removeAllListeners() __CAPGO_KEEP_1__

전체 참조

@capgo/capacitor-인터콤에서 계속 사용하세요

Using @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intercom Using @capgo/capacitor-intercom @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intercom @capgo/capacitor-intercom @capgo/capacitor-인터콤 구현 세부 사항을 위한 Getting Started Using @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intercom Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리에서 제품 워크플로우를 위해 Capacitor Capgo 플러그인 Capacitor 플러그인 Capgo에서 구현 세부 정보를 위해 플러그인 추가 또는 업데이트 __CAPGO_KEEP_0__ 플러그인 __CAPGO_KEEP_1__에서 구현 세부 정보를 위해

FAQ

인터콤 플러그인 FAQ

Capacitor 앱에 인터콤 플러그인을 설치하는 방법은 어떻게 되나요?

bun add @capgo/capacitor-intercom (또는 npm install @capgo/capacitor-intercom) 명령어를 실행한 후 bunx cap sync 명령어를 실행하여 iOS와 Android 프로젝트가 네이티브 code를 인식하도록 합니다. 그리고 앱 code에서 @capgo/capacitor-intercom을 import합니다.

capgo와 capacitor-intercom은 React, Vue 및 Angular과 함께 작동합니까?

Yes. Intercom is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-intercom support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-intercom free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-intercom/ and the package is free to install from npm. Bug reports and pull requests are welcome.

애플 스토어 리뷰 없이도 Intercom을 사용하는 code를 업데이트 할 수 있나요?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

앱 리뷰 기다리지 않고 Intercom 변경을 배포하세요.

플러그인이 스토어 빌드에 포함되면 Capgo live updates는 사용자에게 몇 분만에 자바스크립트, HTML 및 CSS 변경을 푸시합니다.

Capgo로 시작하세요.