Skip to main content
Answered

How do I install Intercom on React?


Forum|alt.badge.img
Did this topic help you find an answer to your question?

10 replies

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • Answer
  • June 26, 2020

  • New Participant
  • 2 replies
  • August 14, 2020

Hey Eric,

 

the react packages that I found look not very good to have something “clean“.

 

if we are using react native to développe our app do you think that use a webview + Segment to push event to intercom could be a good workaround?


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • August 17, 2020

Hey @user675​, when you say "use a webview", can you tell me more about what you're hoping to achieve?


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • September 18, 2020

I'm sharing an answer from our old dev community which folks may find helpful!

 

"Our team has successfully integrated Intercom into the React Native framework we use to create apps for both Android and iOS. An open source library that was a nice kickstarter to get this going was the react-native-intercom package (https://github.com/tinycreative/react-native-intercom468). Some interesting things we found along the way are detailed below in hopes the Intercom team will notice and gain better support for react-native (and similar mobile frameworks)

 

Push Notifications:

react-native-firebase is SUCH a powerful library to use across both Android and iOS. In Android, we had to implement our own FCM handler, and then surface notifications to Intercom & RNFirebase selectively. This was SUPER easy, and Intercom excels here by surfacing isIntercomPush(message) to know who should handle the message. iOS was similar, BUT they don’t allow for FCM in iOS. I know, even firebase is just a passthrough for APN, but it would be a nice option. Similarly in iOS, the ability to check isIntercomPushNotification(userInfo) here is super helpful.

 

Some general things to be aware of:

As a newer iOS developer, I don’t know how much of this is commonplace for an SDK that has a UI component, but the two SDKs are implemented pretty differently. The biggest deal here is that in Android, Intercom lives in its own activity. When launched, your activity will no longer be in the foreground & all the applicable activity lifecycle events apply. On iOS however, the UI is an overlay on top of your app, so your view will continue to believe the it is actively displayed (because a small portion of it is). For us, this means that iOS and Android have different code within the RN javascript bundle to handle the difference, shutting down things in iOS that need to be stopped when the screen is taken by intercom, and in Android, being conscious about how we bring back the activity w/ the focus they were in."

 

 


  • New Participant
  • 1 reply
  • June 17, 2021

hi @eric f11​  Do your lib can intergrate with chat bot of intercom?


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • June 17, 2021

Hey @thuy​, when you say "integrate with chat bot", can you tell me a little more about what you're looking to do, specifically? Do you mean Custom Bots or Resolution Bot?


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • June 25, 2021

@user675​ @thuy​ We now officially support React Native, and I've updated my first response to link to our instructions on how to do this 😄


  • New Participant
  • 2 replies
  • June 25, 2021

Oh wow @eric f11​ That's an amazing news !!!


  • New Participant
  • 3 replies
  • July 19, 2021

That is great news!

Do you plan to support expo plugin config? This would allow your library to work with expo SDK41+ which would be amazing

 


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • July 19, 2021

Hey @jordane​, no plans to support expo plugin config right now.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings