Skip to content

Commit 36e026e

Browse files
rafaellincolnfacebook-github-bot
authored andcommitted
Add a deprecation warning when importing PushNotificationIOS (facebook#23396)
Summary: Added a deprecation warning for the `PushNotificationIOS`, module as part of facebook#23313. [General] [Deprecated] - PushNotificationIOS [was moved to community repo](https://github.com/react-native-community/react-native-push-notification-ios) Pull Request resolved: facebook#23396 Differential Revision: D14055656 Pulled By: cpojer fbshipit-source-id: fc371340aa4d8ac82fee2a3dc6f6c796ae98dde4
1 parent 9df892c commit 36e026e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Libraries/react-native/react-native-implementation.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ module.exports = {
286286
return require('PixelRatio');
287287
},
288288
get PushNotificationIOS() {
289+
warnOnce(
290+
'pushNotificationIOS-moved',
291+
'PushNotificationIOS has been extracted from react-native core and will be removed in a future release. ' +
292+
"It can now be installed and imported from '@react-native-community/push-notification-ios' instead of 'react-native'. " +
293+
'See https://github.com/react-native-community/react-native-push-notification-ios',
294+
);
289295
return require('PushNotificationIOS');
290296
},
291297
get Settings() {

0 commit comments

Comments
 (0)