MohGovIL / hamagen-react-native

Israel's Ministry of Health's COVID-19 Exposure Prevention App
https://health.gov.il/
MIT License
509 stars 153 forks source link

Migrate to React Native Firebase v6 from legacy v5 #175

Closed emanuelb closed 4 years ago

emanuelb commented 4 years ago

The app use legacy react-native-firebase v5 at: https://github.com/MohGovIL/hamagen-react-native/blob/e29687af3f84a257cbd3a129a1b68abe7652dbb0/package.json#L40

The newest react-native-firebase moved to new npm package at @react-native-firebase/app https://www.npmjs.com/package/@react-native-firebase/app

The migration require some code changes, see: https://rnfirebase.io/migrating-to-v6

YOEL311 commented 4 years ago

as much as I know This version (v6) does not support notifications

emanuelb commented 4 years ago

There is support for notifications https://rnfirebase.io/messaging/notifications#main It's also possible to use other package for notifications as well. The v5 package require adding npx as build dependency and running jetify (making the build environment less secure by required not needed software) because it doesn't support androidx but v6 does. https://github.com/invertase/react-native-firebase/issues/1588

YOEL311 commented 4 years ago

Is it paid? Look here https://github.com/invertase/react-native-firebase/issues/2566

chaimPaneth commented 4 years ago

They removed support for local notifications in v6, If you are sent a remote notification you will only see an alert in Notification Center if the app is closed otherwise the app get's notified without the alert, and you can't schedule local notifications you will have to use it with react-native-notifications or any other library out there.

kaplanlior commented 4 years ago

As @chaimPaneth mentioned, they changed their behavior about notifications.

At the moment we'd like to keep it, so not going to upgrade to version 6 + react-native-push-notification. I'm guessing this would be reevaluated in the future.