ben-xD / push

Push notifications in Flutter without firebase_messaging.
https://pub.dev/packages/push
36 stars 22 forks source link

iOS, Push.instance.onBackgroundMessage not triggered when app is terminated #34

Closed ben-aw closed 9 months ago

ben-aw commented 10 months ago

In iOS, when the app is terminated by the user, push notifications can still arrive, but Push.instance.onBackgroundMessage is never triggered.

ben-aw commented 9 months ago

Closing this as it is the expected behavior on iOS as noted here

Excerpt: However, the system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.

delwar36 commented 8 months ago

Closing this as it is the expected behavior on iOS as noted here

Excerpt: However, the system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.

Then how apps like WhatsApp, Messenger works properly even in terminated state? @ben-aw @ben-xD

ben-xD commented 8 months ago

Possibly via VoIP notifications from PushKit. See https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit and https://stackoverflow.com/a/35912009/7365866