Getting Started
Einen Setup-Vorschlag mit den Installationsanweisungen und der vollständigen Markdown-Anleitung für diesen Plugin kopieren.
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.
Installieren
Abschnitt mit dem Titel „Installieren“Sie können unser AI-gestütztes Setup verwenden, um das Plugin zu installieren. Fügen Sie den Capgo-Fähigkeiten Ihrer AI-Anwendung mit folgendem Befehl hinzu:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsVerwenden Sie dann folgende Anweisung:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intercom` plugin in my project.Wenn Sie eine manuelle Einrichtung bevorzugen, installieren Sie das Plugin, indem Sie die folgenden Befehle ausführen und die unten aufgeführten plattform-spezifischen Anweisungen befolgen:
bun add @capgo/capacitor-intercombunx cap syncImportieren
Abschnitt mit dem Titel „Importieren“import { CapgoIntercom } from '@capgo/capacitor-intercom';API Übersicht
Abschnitt mit dem Titel „API Übersicht“loadWithKeys
Abschnitt mit dem Titel „loadWithKeys“Initialisiere Intercom mit API-Schlüsseln während der Ausführung. Verwende diese Option, wenn du die Schlüssel in capacitor.config nicht konfigurieren möchtest.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);registerIdentifiedUser
Abschnitt mit der Überschrift ‘registerIdentifiedUser’Ein bekannter Benutzer bei Intercom registrieren. Zumindest einer der Schlüssel userId oder email muss bereitgestellt werden.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
Abschnitt mit der Überschrift ‘registerUnidentifiedUser’Ein anonymer Benutzer bei Intercom registrieren.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();Benutzerattribute in Intercom aktualisieren.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);Der Benutzer aus Intercom ausloggen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();Ein benutzerdefiniertes Ereignis in Intercom protokollieren.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);displayMessenger
Abschnitt mit dem Titel „displayMessenger“Den Intercom-Messenger öffnen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();displayMessageComposer
Abschnitt mit dem Titel „displayMessageComposer“Den Nachrichtenkomponisten mit einem vorab eingegebenen Nachrichten öffnen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessageComposer({} as IntercomMessageComposerOptions);displayHelpCenter
Abschnitt mit dem Titel „displayHelpCenter“Öffnen Sie das Intercom-Hilfzentrum.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();hideMessenger
Abschnitt mit dem Titel „hideMessenger“Der Intercom-Messenger verbergen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();displayLauncher
Abschnitt mit dem Titel „displayLauncher“Der Intercom-Launcher-Button anzeigen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();hideLauncher
Abschnitt mit dem Titel „hideLauncher“Der Intercom-Launcher-Button verbergen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();displayInAppMessages
Abschnitt mit dem Titel „displayInAppMessages“In-App-Nachrichten von Intercom aktivieren.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
Abschnitt mit dem Titel „hideInAppMessages“In-App-Nachrichten von Intercom deaktivieren.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
Abschnitt mit dem Titel „displayCarousel“Ein bestimmtes Intercom-Carousel anzeigen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);displayArticle
Abschnitt mit dem Titel „displayArticle“Ein bestimmtes Intercom-Artikel anzeigen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);displaySurvey
Abschnitt mit dem Titel „displaySurvey“Ein bestimmtes Intercom-Umfrage anzeigen.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);setUserHash
Abschnitt mit dem Titel „setUserHash“Setze den HMAC für die Identitätsprüfung.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);setUserJwt
Abschnitt mit dem Titel „setUserJwt“Setze JWT für die sichere Messengerauthentifizierung.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);setBottomPadding
Abschnitt mit dem Titel „setBottomPadding“Setze die untere Abstandseinstellung für die Intercom-Messenger-UI.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setBottomPadding({} as IntercomBottomPaddingOptions);sendPushTokenToIntercom
Abschnitt mit dem Titel „sendPushTokenToIntercom“Senden Sie einen Push-Benachrichtigungstoken an Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);receivePush
Abschnitt mit dem Titel „receivePush“Ein empfangenes Intercom-Push-Benachrichtigung bearbeiten.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);getUnreadConversationCount
Abschnitt mit dem Titel „getUnreadConversationCount“Ermitteln Sie die Anzahl der ungelesenen Gespräche für den aktuellen Benutzer.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();Typenverweis
Abschnitt mit dem Titel „Typenverweis“IntercomLoadOptions
Abschnitt mit dem Titel „IntercomLoadOptions“export interface IntercomLoadOptions { appId?: string; apiKeyIOS?: string; apiKeyAndroid?: string;}IntercomIdentifiedUserOptions
Abschnitt mit dem Titel “IntercomIdentifiedUserOptions”export interface IntercomIdentifiedUserOptions { userId?: string; email?: string;}IntercomUserUpdateOptions
Abschnitt mit dem Titel “IntercomUserUpdateOptions”export interface IntercomUserUpdateOptions { userId?: string; email?: string; name?: string; phone?: string; languageOverride?: string; customAttributes?: { [key: string]: any }; companies?: IntercomCompany[];}IntercomLogEventOptions
Abschnitt mit dem Titel “IntercomLogEventOptions”export interface IntercomLogEventOptions { name: string; data?: { [key: string]: any };}IntercomMessageComposerOptions
Abschnitt mit dem Titel “IntercomMessageComposerOptions”export interface IntercomMessageComposerOptions { message: string;}IntercomCarouselOptions
Abschnitt mit dem Titel “IntercomCarouselOptions”export interface IntercomCarouselOptions { carouselId: string;}IntercomArticleOptions
Abschnitt mit dem Titel “IntercomArticleOptions”export interface IntercomArticleOptions { articleId: string;}IntercomSurveyOptions
Abschnitt mit dem Titel „IntercomSurveyOptions“export interface IntercomSurveyOptions { surveyId: string;}IntercomUserHashOptions
Abschnitt mit dem Titel „IntercomUserHashOptions“export interface IntercomUserHashOptions { hmac: string;}IntercomUserJwtOptions
Abschnitt mit dem Titel „IntercomUserJwtOptions“export interface IntercomUserJwtOptions { jwt: string;}IntercomBottomPaddingOptions
Abschnitt mit dem Titel „IntercomBottomPaddingOptions“export interface IntercomBottomPaddingOptions { value: number;}IntercomPushTokenOptions
Abschnitt mit dem Titel „IntercomPushTokenOptions“export interface IntercomPushTokenOptions { value: string;}Quelle der Wahrheit
Abschnitt mit dem Titel „Quelle der Wahrheit“Diese Seite wurde aus dem Plugin generiert. src/definitions.ts. Wenn sich die öffentliche API im Hintergrund ändert, führen Sie die Synchronisierung erneut durch.
Weiter geht es von Getting Started
Abschnitt mit dem Titel „Weiter geht es von Getting Started“Wenn Sie " Getting Started " zum Planen von Dashboard und API-Operationen verwenden, verbinden Sie es mit Mit @capgo/capacitor-intercom für die native Fähigkeit in Mit @capgo/capacitor-intercom, API-Übersicht für die Implementierungsdetails in API-Übersicht, Einführung für die Implementierungsdetails in Einführung, API Schlüssel für die Implementierungsdetails in API Schlüssel und Geräte für die Implementierungsdetails in Geräte.