I would like to know if it's possible to install a package only for iOs or Android in React Native ? I'm using tipsi-stripe for Apple Pay and there is some bugs with Android and RN0.61.5, and I don't need it on Android.
I tried to delete module from Android Studio and from packages.json and it's working but it's not clean, does someone have a better solution ?
Try to add this in your react-native.config
module.exports = {
  ...
  dependencies: {
    'tipsi-stripe': {
      platforms: {
        android: null,
      },
    },
  },
};
                        You can't install package only for IOS but you can import it based on platform as follow:
import { Platform } from 'react-native'
let ModuleName
if (Platform.OS === 'ios') {
  ModuleName = require('moduleName')
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With