0
votes

I just inherited an mobile app which is a native layer to handle push notification that wraps a PWA.

From onesignal i can send test message to the app on my iphone just fine. But notification from the the server to the iphone don't work.

Looking at one signal dashboard it looks like the server is not sending those push notifications to onesignal for iOS (it sends it fine for android).

What that leads me to beleive is that either: 1- the PWA layer is not sending the push token to the servers 2- an error is happening on the server

My question, can a PWA on iOS capture the push token for the device or is it only available on the native side.

2

2 Answers

0
votes

Safari does not support the Push API. Push notifications on iOS have to be done at a native app level.

0
votes

Here is what I found out which allowed me to solve the issue:

  • only the native side can get the push token
  • The push token needs to be passed from the native side to the PWA side once teh user is signed in (and cleared once the user signs out)

I hope this helps someone down the road