MohGovIL / hamagen-react-native

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

react-native-network-info dep not needed in android app #273

Open emanuelb opened 4 years ago

emanuelb commented 4 years ago

The package react-native-network-info is used only in IOS app as can be seen in below code: (for android the package react-native-wifi-reborn is used instead) but it's included in the android app as part of the build process.

ios path:

https://github.com/MohGovIL/hamagen-react-native/blob/0afc8cabc4ea82c8e3ef469f19f989c8c93de24e/src/services/WifiService.ts#L2 https://github.com/MohGovIL/hamagen-react-native/blob/0afc8cabc4ea82c8e3ef469f19f989c8c93de24e/src/services/WifiService.ts#L13-L14

android path: https://github.com/MohGovIL/hamagen-react-native/blob/0afc8cabc4ea82c8e3ef469f19f989c8c93de24e/src/services/WifiService.ts#L1 https://github.com/MohGovIL/hamagen-react-native/blob/0afc8cabc4ea82c8e3ef469f19f989c8c93de24e/src/services/WifiService.ts#L22-L23

fix: use platform specific imports so that not needed packages won't be included in the resulted APK/IPA. (and won't be installed in the build process as well)