By default XenForo relies on a browser being willing to subscribe to push notifications if the user previously granted permission. Safari (and iOS PWA) does not work that way, even a re-subscribe needs to be initiated by a user gesture (
see this post). This causes iOS PWA (and desktop Safari browsers) to "lose" their push subscription since XenForo is relying on browsers to re-subscribe. This updates changes some XenForo behavior to fix that:
- Push subscriptions are not unsubscribed when a user is re-authenticating two-step.
- Ideally, this shouldn't be the case, but if (for whatever reason) XenForo triggers a push unsubscribe, if the browser is Safari (or PWA), we also clear the push_history_user_ids localStorage, which will allow the push notice to show again for the user so they can choose to re-subscribe (with a user gesture, so it works). It's not realistic to expect users to know to resubscribe with a button buried in their settings.
TL;DR: This should solve the issue XenForo has where iOS PWA users lose their push subscriptions (or at the very least least make it happen less often).