Add a deprecation warning when importing ImagePickerIOS (#25074)

Summary:
Added a deprecation warning for the ImagePickerIOS, module as part of #23313.

## Changelog

[General] [Deprecated] - ImagePickerIOS [was moved to community repo](https://github.com/react-native-community/react-native-image-picker-ios)
Pull Request resolved: https://github.com/facebook/react-native/pull/25074

Differential Revision: D15554728

Pulled By: cpojer

fbshipit-source-id: 867f4c1db64064fef7511d8ff3dc0a621281eb7b
This commit is contained in:
Johan-dutoit authored and Facebook Github Bot committed 2019-05-30 02:54:54 -07:00
1 parent 338298417f
commit 6d54423b78
1 file changed
+7
+7
View File
@@ -221,6 +221,13 @@ module.exports = {
return require('I18nManager');
},
get ImagePickerIOS() {
warnOnce(
'imagePickerIOS-moved',
'ImagePickerIOS has been extracted from react-native core and will be removed in a future release. ' +
"Please upgrade to use either '@react-native-community/react-native-image-picker' or 'expo-image-picker'. " +
"If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. " +
'See https://github.com/react-native-community/react-native-image-picker-ios',
);
return require('ImagePickerIOS');
},
get InteractionManager() {