Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expo plugin #155

Merged
merged 4 commits into from
Feb 22, 2024
Merged

feat: expo plugin #155

merged 4 commits into from
Feb 22, 2024

Conversation

erwanlpfr
Copy link
Contributor

Hello,

After a while I was looking for an expo plugin for intercom.
It turns out that existing projects are maintained by the community.

The last up to date is expo/config-plugins#208 suggested by @enagorny.
As you can see in this discussion, an expo maintainer suggested creating a PR to have more visibility in your project.
(Would be nice to have an issue tab here)
So, I give full credit of this work to @enagorny and community for this code.

I added the needed package and the related code.
This code is in a safer place here since it is supposed to follow the native code.

Let me know if it works for you, intercom team and for the others!

@erwanlpfr
Copy link
Contributor Author

@Br1an-Boyle, hello!
I would like to know if there is any plan for this PR ?
Thanks!

@yonitou
Copy link

yonitou commented Feb 1, 2024

Hi,
Can you please guys review this PR ? We are so many waiting for this to happen :D

@ottob
Copy link
Contributor

ottob commented Feb 1, 2024

Yes, please consider this. Expo support would be very useful.

@gabimoncha
Copy link

@Br1an-Boyle @uddish @Looskie is it possible to look over and merge this PR?
It will benefit the entire Expo community

@yonitou
Copy link

yonitou commented Feb 20, 2024

Hi,
Sorry to insist but this subject is really URGENT. Expo SDK 50 is now out and it's increasing the gap between Expo/React Native & the old config plugin for Intercom : for example

PS : @erwanlpfr , meanwhile, is it possible to add the support for push notifications so the plugin will be almost complete when this PR will be merged ?

@uddish
Copy link
Contributor

uddish commented Feb 20, 2024

Hey folks 👋
We are looking into this issue and will get back as soon as possible.
Thank you for your patience.

app.plugin.js Outdated Show resolved Hide resolved
src/expo-plugins/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@uddish uddish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🎉🏎️

@uddish uddish merged commit e92ce86 into intercom:main Feb 22, 2024
5 checks passed
@yonitou
Copy link

yonitou commented Feb 22, 2024

Wow this is Christmas 😀
Where can we create an issue for push notifications support + docs integration for this plugin ? You don't have issues panel in this repository :(

@uddish
Copy link
Contributor

uddish commented Feb 22, 2024

Hey @yonitou
The docs have been updated here:
https://developers.intercom.com/installing-intercom/react-native/installation/#using-intercom-with-expo

For the notifications support, I would suggest opening a PR for now 😄

@Joshandrews43
Copy link

@uddish what is the minimum version of react-native-intercom do we need to use for this to work with expo?

@ottob
Copy link
Contributor

ottob commented Feb 22, 2024

Great to see this merged. Thanks!

To use EU hosting do we need to change both the intercomRegion settings as described here?
https://developers.intercom.com/installing-intercom/react-native/installation/#using-intercom-with-expo

and the infoPlist settings as described here:
https://developers.intercom.com/installing-intercom/react-native/data-hosting-region-configuration/

?

@matis-dk
Copy link

matis-dk commented Feb 23, 2024

Is the config plugin name @config-plugins/intercom-react-native correctly specified?

Usually the convention is the use the package name inside the package.json file. I'm getting the following error from Expo when trying to build:

'Failed to resolve plugin for module relative to "/Users/...."'

@ottob
Copy link
Contributor

ottob commented Feb 23, 2024

It does not work for me either. When I tried with:

    [
        '@intercom/intercom-react-native',
        {
          appId: 'our-id',

I got the following error:

PluginError: Package "@intercom/intercom-react-native" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Cannot use import statement outside a module
/myproject/node_modules/react-native/index.js:14
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
^^^^^^

Partial fix in #161 maybe someone else can figure out the rest?

@ottob
Copy link
Contributor

ottob commented Feb 23, 2024

And the README import fix #162

@Joshandrews43
Copy link

@ottob I get the same issue using v6.5.0, PluginError: Package "@intercom/intercom-react-native" does not contain a valid config plugin.

@erwanlpfr
Copy link
Contributor Author

I missed that point !
The previous PR looks fixing this issue !
Thank you!

@uddish
Copy link
Contributor

uddish commented Feb 26, 2024

Hey folks
Thanks for the comments, I will take a look at them soon and get back to you all.

@CarlMenke
Copy link

Excited for this all to get working! Does anyone know if push notifications are currently being worked on?

uddish added a commit that referenced this pull request Mar 13, 2024
* feat: expo plugin

* fix: export usage

* chore: use correct wording for Australia

Co-authored-by: Uddish Verma <[email protected]>

---------

Co-authored-by: Uddish Verma <[email protected]>
@ovidb
Copy link

ovidb commented Mar 14, 2024

@uddish any chances of getting back on the comments, most importantly notifications?

We are very reliant on notifications and the previous version of your SDK has a couple of memory-leaks and on specifically on Android we noticed issues with the real-time-ness of messages.
(ie messages sent by our team are not being received by the users unless they send the message)

all of them seem to be fixed in the latest SDK but without notifications we can't upgrade and it's causing us quite a bit of trouble.

@brkastner
Copy link

@uddish any chances of getting back on the comments, most importantly notifications?

We are very reliant on notifications and the previous version of your SDK has a couple of memory-leaks and on specifically on Android we noticed issues with the real-time-ness of messages. (ie messages sent by our team are not being received by the users unless they send the message)

all of them seem to be fixed in the latest SDK but without notifications we can't upgrade and it's causing us quite a bit of trouble.

I made a quick plugin to add support for iOS notifications: https://gist.github.com/brkastner/fc3339faf623201ef6e2945afae525ec

@yonitou
Copy link

yonitou commented Mar 19, 2024

@brkastner Would you be open to add this gist in a PR on the repo ? So at least it would be a starting point for someone else to complete it with the Android part ?

@erwanlpfr erwanlpfr deleted the feat/expo-plugin branch March 19, 2024 08:45
@yonitou
Copy link

yonitou commented Apr 19, 2024

Coming back here after one month. @uddish, is it possible to plan the push notifications support ? Without it, a lot of us can't upgrade without losing the feature .. Some news would be great

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.

10 participants