You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: This plugin follows semantic versioning aligned with Capacitor and maintains compatibility with Intercom SDKs (iOS, Android). If you encounter any issues due to versioning inconsistencies, please open an issue to help us improve the plugin.
Installation
Using npm:
npm install @capacitor-community/intercom
Using yarn:
yarn add @capacitor-community/intercom
Sync native files:
npx cap sync
Usage
import{Intercom}from'@capacitor-community/intercom';import{PushNotifications}from'@capacitor/push-notifications';// Register for push notifications from IntercomPushNotifications.register();// Register an indetified userIntercom.registerIdentifiedUser({userId: 123456});Intercom.registerIdentifiedUser({email: '[email protected]'});Intercom.registerIdentifiedUser({userId: 123456,email: '[email protected]'});// Register a log eventIntercom.logEvent({name: 'my-event',data: {pi: 3.14}});// Display the message composerIntercom.displayMessageComposer({message: 'Hello there!'});// Identity Verification// https://developers.intercom.com/installing-intercom/docs/ios-identity-verificationIntercom.setUserHash({hmac: 'xyz'});
Now you should be set to go. Try to run your client using ionic cap run android --livereload.
Tip: every time you change a native code you may need to clean up the cache (Build > Clean Project | Build > Rebuild Project) and then run the app again.
We're starting fresh under an official org. If you were using the previous npm package capacitor-intercom, please update your package.json to @capacitor-community/intercom. Check out changelog for more info.
Breaking changes from Capacitor v2 to v3
UserUpdateOptions option type becomes IntercomUserUpdateOptions