From 36e026ee89533d090a300d08cb0bb32effc734cb Mon Sep 17 00:00:00 2001 From: Rafael Lincoln Date: Tue, 12 Feb 2019 13:38:10 -0800 Subject: [PATCH] Add a deprecation warning when importing PushNotificationIOS (#23396) Summary: Added a deprecation warning for the `PushNotificationIOS`, module as part of #23313. [General] [Deprecated] - PushNotificationIOS [was moved to community repo](https://github.com/react-native-community/react-native-push-notification-ios) Pull Request resolved: https://github.com/facebook/react-native/pull/23396 Differential Revision: D14055656 Pulled By: cpojer fbshipit-source-id: fc371340aa4d8ac82fee2a3dc6f6c796ae98dde4 --- Libraries/react-native/react-native-implementation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index b7dc52b10a0..ebc3046a227 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -286,6 +286,12 @@ module.exports = { return require('PixelRatio'); }, get PushNotificationIOS() { + warnOnce( + 'pushNotificationIOS-moved', + 'PushNotificationIOS has been extracted from react-native core and will be removed in a future release. ' + + "It can now be installed and imported from '@react-native-community/push-notification-ios' instead of 'react-native'. " + + 'See https://github.com/react-native-community/react-native-push-notification-ios', + ); return require('PushNotificationIOS'); }, get Settings() {