Push Notifications with ExpoKit - advice?

Hi all - I’ve detached to ExpoKit because I need to be able to set up in app purchases for my app, and would also like to have an app extension. This of course means I can no longer use the expo push notifications service, which is brilliantly easy to use. I’ve spent four days trying to figure out an implementation that I can now use for push notifications and I am really struggling to find anything that works.

I have a Rails API on the backend. I wonder could anyone suggest a setup that worked for them? And if so, any good tutorials that you used?

I’ve tried several different tutorials, including one around OneSignal (linking libraries in Xcode was leading to missing file errors etc). I’ve also started looking at AWS SNS and am a little confused by it but could probably keep going on that if I need to. I’m not that comfortable in Xcode either (hence why I love RN) so the less I have to do in there, the better.

Many thanks!
Ian

1 Like

Since 1 week, I’m trying to get notifications push work in my expokit project.

I tested react-native-fcm: https://github.com/evollu/react-native-fcm/issues/511
I tested react-native-onesignal: https://github.com/geektimecoil/react-native-onesignal/issues/306

I didn’t have answers… It’s very very weird, how people that are using expokit are doing with notifications push ?

I had the same issue as you with react-native-one-signal. I think I got rid of that error eventually by linking the world in Xcode but then i just moved on to another error that I had no idea how to fix.

I think I’ll remove ExpoKit if the notifications push doesn’t work, I have no choice… But I’m very astonished because there are not many issues/topic about it, I don’t really understand how the people are doing this

1 Like

Nah… I wanna try this on detach mode, both on iOS and Android.

I’ll let you know if it works or not

1 Like

Good luck ! React-native-fcm or react-natice-onesignal ?

@martinezguillaume i’ve tried on pure react native:

  • react-native-onesignal: Run smoothly (recommended)
  • react-native-fcm: got some issue, push notif run not running on background. you must open the apps first, then notification will appear
1 Like

Cool, so on pure React Native (through react-native init?) you could get react-native-onesignal to work smoothly? I was getting missing file issues in Xcode when I tried it through ExpoKit. Will be interested to hear how it goes for you using ExpoKit. I might have to fully eject to get it to work which would be a shame.

What about OneSignal with Expo detached app?

@ianlenehan yes. works even with react-native init. Will try with expo push notif next week. I’ll share here when i’m finished :wink:

1 Like

never tried this. But i think it’s overkill when expo itself already have push notification. And your distributed apps will be on bigger size

Expo has support for push notifications unless you’ve detached and using ExpoKit which I am therefore I’m looking for other solutions, thanks!

A guy called kirkness resolve it with react-native-onesignal in the issue
You need to install OneSignal with pod (add this to PodFile pod 'react-native-onesignal', :path => '../node_modules/react-native-onesignal')
and DON’T link it with react-native link

Thanks @martinezguillaume I’ll give that a go!

1 Like

Whaddya know, the build worked! Will report back if I can get the whole thing working together. :smiley:

1 Like

Oh man it actually works! I don’t know who this mysterious kirkness guy is but I owe him haha. I got it to work using that advice and the ReadMe https://github.com/geektimecoil/react-native-onesignal as well as this tutorial which is a little out of date but really helpful: React Native Push Notifications with OneSignal | by Spencer Carli | Differential | Medium

Thanks @martinezguillaume! Hope you also get it working.

1 Like

Boom!!! I managed to build successfully, now checking everything else…

Thanks :smile:

1 Like

Has anyone checked if there are legal limitations using a 3rd party like OneSignal?

Not sure it answers your question but on Expo’s side there aren’t limitations like this.

@nirpeled i think there is no limitations. is that working on ios too ?