cmaycumber / config-plugin-react-native-intercom

Expo plugin for adding @intercom/react-native-intercom using expo config plugins
75 stars 39 forks source link

Intercom Messenger not displaying after following installation instructions for this library #74

Closed asnaseer closed 10 months ago

asnaseer commented 10 months ago

I am trying to get the Intercom Messenger to display in my React Native application and found this library which I thought is what I needed. I have done the following:

Once Expo completed building the dev clients, I installed the new dev client on my iPhone by scanning the QR code from the Expo Build for iOS and then ran yarn start and scanned the QR code from my iPhone to login to our application but do not see the Intercom Messenger displayed anywhere.

I then tried adding this to where we handle a user logging into our app:

import Intercom from "@intercom/intercom-react-native";
...
    await Intercom.loginUserWithUserAttributes({
      userId: options.uid,
      email: options.email,
    });
...

and added this to where we handle a user logging out:

import Intercom from "@intercom/intercom-react-native";
...
    await Intercom.logout();
...

but still do not see the Intercom Messenger anywhere.

Is there some other set of steps that I have forgotten to follow?

My configuration is:

asnaseer commented 10 months ago

I managed to finally work out what was wrong, I needed to enable the Intercom Messenger button in the app by calling:

import Intercom, { Visibility } from "@intercom/intercom-react-native";
...
await Intercom.setLauncherVisibility(Visibility.VISIBLE);
...