How to install a package / library only for ios in react native

321 Views Asked by At

am using ffmpeg-kit-react-native but i want to install it for ios only ...as it increases the build size 3X for android .. am not using it for android as well . is it possible to install it for ios only? am on [email protected]

i tried creating react-native.config.js but it does work

2

There are 2 best solutions below

0
Adnan Ashraf On BEST ANSWER

it was react-native.config.js all along ... i was not defining package correctly .

module.exports = {
  dependencies: {
    'ffmpeg-kit-react-native': {
      platforms: {
        android: null,
      },
    },
  },
};
3
Muhammad Jawad Mansoor On

Add this in your <your project>/react-native.config

module.exports = {
  ...
  dependencies: {
    'ffmpeg-kit-react-native': {
      platforms: {
        android: null,
      },
    },
  },
};