From 6d54423b788ba2f0ec5c7eda9b2ab3d66a5bd529 Mon Sep 17 00:00:00 2001 From: Johan-dutoit Date: Thu, 30 May 2019 02:51:49 -0700 Subject: [PATCH] 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 --- Libraries/react-native/react-native-implementation.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 0b9f07b6aa9..727d8f3415c 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -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() {