Use the Platform
import {Platform} from 'react-native';
// Importe a biblioteca assim:
const ImageCropperPackage = Platform.select({
ios: () => null,
android: () => require('com.ozdevcode.theartofdev.edmodo.cropper.ImageCropperPackage'),
})();
// OU
const ImageCropperPackage = Platform.select({
ios: () => require('br.com.outrabiblioteca.ImageCropperPackage'),
android: () => require('com.ozdevcode.theartofdev.edmodo.cropper.ImageCropperPackage'),
})();
With this you only use the component only when the constant ImageCropperPackage
is different from null