react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
741 stars 285 forks source link

Native modules can not be null #222

Open salman-simplecrm opened 3 years ago

salman-simplecrm commented 3 years ago

I had earlier react-native-push-notification getting native modules can not be a null error.

error: bundling failed: SyntaxError in /Users/salmankhan/Projects/hil/node_modules/@react-native-community/push-notification-ios/js/index.js: /Users/salmankhan/Projects/hil/node_modules/@react-native-community/push-notification-ios/js/index.js: Unexpected token (465:33) 463 | if (notifKey === 'aps') { 464 | this._alert = notifVal.alert;

465 | this._title = notifVal?.alertTitle; | ^ 466 | this._subtitle = notifVal?.subtitle; 467 | this._sound = notifVal.sound; 468 | this._badgeCount = notifVal.badge;

BUNDLE [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ 98.8% (1204/1216), failed.