Skip to content

JDouven/capacitor-plugin-freshchat

 
 

Repository files navigation

freshchat-capacitor

Integrates Freshchat with your Capacitor App

Only implemented the following methods:

  • init
  • updateUser
  • updateUserProperties
  • showConversations
  • showFAQs

Install

npm install https://github.com/viveapp/capacitor-plugin-freshchat.git
npx cap sync

Initialise

  • Android:

    • Setup Freshchat in your Android project
    • Open Android project, in top-level build.gradle within buildScript section, add ext.kotlin_version = '1.7.0';
    • In top-level variables.gradle, within ext section add freshchatVersion = '5.1.0'
  • iOS: Open XCode, open Pods on your App level, select FreshchatCapacitor on targets list, navigate to Build Phases, find Link Binary With Libraries section, and add FreshchatSDK.xcfrmework there;

API

initialize(...)

initialize(options: InitOptions) => Promise<void>

Initialize the Freshchat SDK

Param Type
options InitOptions

updateUser(...)

updateUser(options: UpdateUserOptions) => Promise<void>
Param Type
options UpdateUserOptions

updateUserProperties(...)

updateUserProperties(options: Record<string, unknown>) => Promise<void>
Param Type
options Record<string, unknown>

showConversations()

showConversations() => Promise<void>

showFAQs()

showFAQs() => Promise<void>

Interfaces

InitOptions

Prop Type
appId string
appKey string

UpdateUserOptions

Prop Type
firstName string
lastName string
email string
phone { countryCode: string; number: string; }

Type Aliases

Record

Construct a type with a set of properties K of type T

{ [P in K]: T; }

About

Plugin for adding Freshchat to your Capacitor based app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 37.9%
  • Swift 28.0%
  • Java 9.0%
  • Ruby 7.6%
  • Objective-C 7.5%
  • TypeScript 6.5%
  • JavaScript 3.5%