Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@capacitor-community/intercom
Advanced tools
@capacitor-community/intercom
Capacitor community plugin for enabling Intercom capabilities
Maintainer | GitHub | Social |
---|---|---|
Stewan Silva | stewwan | @StewanSilva |
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.
Using npm:
npm install @capacitor-community/intercom
Using yarn:
yarn add @capacitor-community/intercom
Sync native files:
npx cap sync
import { Intercom } from "@capacitor-community/intercom";
const intercom = new Intercom();
import { Plugins } from "@capacitor/core";
const { PushNotifications } = Plugins;
//
// Register for push notifications from Intercom
PushNotifications.register()
//
// Register an indetified user
intercom
.registerIdentifiedUser({ userId: 123456 }) // or email or both
//
// Register a log event
intercom
.logEvent({ name: "my-event", data: { pi: 3.14 } })
//
// Display the message composer
intercom
.displayMessageComposer({ message: "Hello there!" } })
//
// Identity Verification
// https://developers.intercom.com/installing-intercom/docs/ios-identity-verification
intercom
.setUserHash({ hmac: "xyz" } })
ionic start my-cap-app --capacitor
cd my-cap-app
npm install —-save @capacitor-community/intercom
mkdir www && touch www/index.html
npx cap add ios
{
…
"plugins": {
"IntercomPlugin": {
"ios-apiKey": "ios_sdk-xxx",
"ios-appId": "yyy"
}
}
…
}
npx cap open ios
Tip: every time you change a native code you may need to clean up the cache (Product > Clean build folder) and then run the app again.
ionic start my-cap-app --capacitor
cd my-cap-app
npm install —-save @capacitor-community/intercom
mkdir www && touch www/index.html
npx cap add android
{
…
"plugins": {
"IntercomPlugin": {
"android-apiKey": "android_sdk-xxx",
"android-appId": "yyy"
}
}
…
}
npx cap open android
[extra step]
in android case we need to tell Capacitor to initialise the plugin:on your
MainActivity.java
file addimport com.getcapacitor.community.intercom.IntercomPlugin;
and then inside the init callbackadd(IntercomPlugin.class);
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.
MIT
Thanks goes to these wonderful people (emoji key):
Stew 💻 📖 | David Seek 💻 | Roman Nikitin 💻 | Anne Tomassoni 💻 👀 | Maciej Modzelewski 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Enable Intercom features for Capacitor apps
The npm package @capacitor-community/intercom receives a total of 9,245 weekly downloads. As such, @capacitor-community/intercom popularity was classified as popular.
We found that @capacitor-community/intercom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 44 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.