When do web push notification subscriptions expire on ios?

I have a web page that was added to an ios Home Screen. It has a service worker and has successfully subscribed to push notifications. How can I determine when that subscription object no longer becomes valid? In general, does Apple have a policy on when it invalidates push subscription objects?

There is no "expirationTime" included on the subscription object, like other browsers provide, so I have no way of anticipating the expiration. If Apple does not expire push subscriptions ever, that is the best case scenario. If they do though, where can I figure that out?

Adding more details to this.

It seems that PWA push notifications on iOS are being revoked outside of user interaction. I have verified this with logging from within a service worker, after a push notification is received in the service worker via the "push" event. In the event handler, I check the service worker registration for an active push subscription via ServiceWorkerRegistration.pushmanager.getSubscription(), and sometimes it reports null, indicating that the push subscription which was just used to receive a message is now no longer active.

This is a critical failing of PWA push notifications on iOS, especially given that the pushsubscriptionchange event is not supported. How is an app supposed to respond to an arbitrary revocation of a push subscription, given that all subscriptions must be initiated by a user interaction? Why are PWAs being considered second class citizens when it comes to notifications? I've reached out several times on your bug reporting system with push subscription payloads that are no longer valid and have not been revoked by the end user, but the problem has been addressed. Does Apple know about the issue and are working on a fix? Is there a workaround? Or is it being ignored because PWAs are not a form factor that Apple is supporting in good faith?

I was having the same issue, but it might have been my fault. trying this out: https://dev.to/progressier/how-to-fix-ios-push-subscriptions-being-terminated-after-3-notifications-39a7

When do web push notification subscriptions expire on ios?
 
 
Q