0

I'm using react-native-push-notification. I'm trying to test push notifications, if I build app and upload it to testflight it shows remote notifications just fine, but when I do it with xcode build on a real device it doesn't react at all (I'm getting onRegister call and notification token though). This problem is only on IOS, android getting notifications in production and development. Can't google anything related so probably I'm missing something.

P.S. I'm using backend to send notifications through firebase

  • Is the onMessage/onBackgroundMessage- Handler getting fired? – Maximilian Dietel Dec 14 '21 at 15:46
  • there is no such handler, only onNotification which is not being called with xcode build https://github.com/zo0r/react-native-push-notification#:~:text=onNotification%3A%20function%20(notification)%20%7B%0A%20%20%20%20console.log(%22NOTIFICATION%3A%22%2C%20notification)%3B%0A%0A%20%20%20%20//%20process%20the%20notification%0A%0A%20%20%20%20//%20(required)%20Called%20when%20a%20remote%20is%20received%20or%20opened%2C%20or%20local%20notification%20is%20opened%0A%20%20%20%20notification.finish(PushNotificationIOS.FetchResult.NoData)%3B%0A%20%20%7D%2C – Danila Berentsev Dec 15 '21 at 08:08
  • Im talking about the firebase Handlers – Maximilian Dietel Dec 15 '21 at 15:29

2 Answers2

0

you have to go in capaibility in xcode and active PushNotification first

for more info see this

Meisan Saba
  • 800
  • 2
  • 9
  • 25
0

hope you have followed all the steps to get the APNS certificate and attached that to your xcode, before the build, if not please do so. Also, in addition you need to have .pem file to add to your Firebase to make your ios app enable to send and receive push.