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.
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)
The package
react-native-network-info
is used only in IOS app as can be seen in below code: (for android the packagereact-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)