react-native-webrtc / react-native-voip-push-notification

React Native VoIP Push Notification - Currently iOS only
ISC License
213 stars 83 forks source link

Local Notification event listener is not logging any response #60

Closed nikesh8 closed 3 years ago

nikesh8 commented 4 years ago

I'm working with iOS for VoIP notification and I've used react-native-voip-push-notification to handle my VoIP notification.

I'm able to trigger localNotification using the following code:

VoipPushNotification.addEventListener('notification', (notification) => {
        console.log('Notification:::', notification)
        VoipPushNotification.presentLocalNotification({
          alertBody: notification.getMessage()
        });
      });

but local Notification listener is not logging out any notifications:

VoipPushNotification.addEventListener('localNotification', (notification) => {
      // --- when user click local push
     console.log('Local Notification:::', notification)
    });

I've enabled push notification, Background mode (VoIP notification, Background fetch, and Remote notification) from xCode capabilities. I'm using RN0.59.10. Is there something I'm missing?

Thanks in advance

30

zxcpoiu commented 3 years ago

localNotification in this lib is broken and will be deprecated. Use PushNotificationIOS to handle present notification instead