Skip to content

Conversation

webmonch
Copy link

In current implementation in Expo projects when you use plugin to init the SDK - it inits at the very start of the app, even before the App.tsx is loaded. As a result if you try to hide intercom with hideIntercom or setInAppMessageVisibility('GONE') - messages are still visible for a second or so as SDK inits prior to that.

The only way to avoid it is to manually init plugin in a separate native plugin, which is not optimal, especially if you don't have native plugins in the project and need to add a new one just for that.

I added initialize() method and an option to disable auto init via plugin.

@robwalkerco
Copy link

@jasonpraful It would be great to get this, or a similar option, merged and released. I have the same issue with expo, where I only want to init Intercom once the we have dismissed the splash screen after some initial app bootstrapping, and currently, an in-app messages get displayed while the splash screen is still displayed.
It looks like we many need to use patch-package or a custom native module, to implement the desired behaviour at the moment,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants