Open sabres207 opened 7 months ago
Hmm try to debug this file: https://github.com/khmyznikov/ios-pwa-wrap/blob/iap/pwa-shell/AppDelegate.swift There is 4 calls of this function.
I think there is two very similar events from FCM, but one triggers every time and another only while you click on notification... But the wrapper sends the same event probably? Try to identify them and you can tweak the behaviour.
Hey, I changed my app built with pwabuilder by the code you provider in this project, and everything works great. I also add code for sending the token to the js code, so we can store each user's token, and it also works. Thanks for that great work around!
On thing that bothers me tho, is that the push-notification event gets triggered directly when the phone gets the push, before the user even clicked on the notification. After the user clicks on the notification, the event fires again. This only happens when app is in foreground.
I tried to understand why it happens and what exactly in the calls of sendPushToWebView causes it, but I lack the knowledge in swift to get what's going on there.
Would appreciate any thoughts.