pushy / pushy-react-native

The official Pushy SDK for React Native apps.
Apache License 2.0
16 stars 20 forks source link

Testing on Expo Go #61

Closed trajano closed 3 years ago

trajano commented 3 years ago

Hi, I am just starting with using @pushy-me and I was wondering if there are instructions on how to set this up with Expo Go client to do some initial POCs. Or do we need to actually deploy our app to the store before we can test things out.

pushy commented 3 years ago

Hi @trajano, Thanks for reaching out.

Unfortunately, Expo and Expo Go are still not currently supported by Pushy. We currently cannot support Expo apps (detached or not) because Headless JS tasks are not yet supported in ExpoKit and are currently broken: https://forums.expo.io/t/appregistry-registerheadlesstask/15425

We weren't able to find a solution to wake your app's JS code when the MainActivity is not running, in order to receive the notification and execute desirable JS code to handle it.

Therefore, until Expo adds support for headless JS (which means adding support getReactNativeHost() in HeadlessJsTaskService) we cannot support ExpoKit RN projects.

We apologize but at this time we can only support pure React Native projects and not ExpoKit due to this broken upstream functionality.

farhadeidi commented 6 months ago

I just wrote a simple Expo plugin to handle Pushy.me in expo managed build. I wrote it based on react-native documentation in website and it works perfectly @pushy https://gist.github.com/farhadeidi/9ec4d591ea50aec15422954ef86083ab