react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
731 stars 280 forks source link

"register" and "registerError" events don't fire on React Native@0.70.6 React@18.1.0 #400

Open alexandergx opened 1 year ago

alexandergx commented 1 year ago

The "register" and "registerError" events don't seem to fire on React Native version 0.70.6. I just tried a fresh project init, and still no success.

package.json:

"react": "18.1.0", "react-native": "0.70.6"

AppDelegate.h and AppDelegate.mm have been configured properly. Xcode Background Mode > Remote Notifications and Push Notifications have been set properly. App builds and runs fine. But the two listener events do not ever fire.

Is this known? Are there any solutions?

atifgulzar commented 1 year ago

I have the same issue

PushNotificationIOS.requestPermissions().then(data => { PushNotificationIOS.addEventListener('register', token => { alert(token); }); });