Push Notifications with ExpoKit - advice?

#1

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

#2

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 ?

0 Likes

#3

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.

0 Likes

#4

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

#5

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

#6

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

0 Likes

#7

@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

#8

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.

0 Likes

#9

What about OneSignal with Expo detached app?

0 Likes

#10

@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

#11

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

0 Likes

#12

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

0 Likes

#13

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

0 Likes

#14

Thanks @martinezguillaume I’ll give that a go!

1 Like

#15

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

1 Like

#16

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: https://medium.com/differential/react-native-push-notifications-with-onesignal-9db6a7d75e1e

Thanks @martinezguillaume! Hope you also get it working.

1 Like

#17

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

Thanks :smile:

1 Like

#18

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

0 Likes

#19

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

0 Likes

#20

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

0 Likes