I am currently facing a problem with push notifications in iOS.
My app receives silent push notifications containing an identifier. This identifier is then used to fetch data from a remote server from which a local notification is created.
As far as I'm aware, if the user has force-quit an app (i.e. by double tapping the home button and swipe closing the app) then the silent push notification does not get passed onto the didReceiveRemoteNotification method in the AppDelegate class [1] [2], thus preventing the app from doing any kind of processing.
I have done a fair amount of research into handling the situation mentioned above. However, was unable to find a definitive answer and was hoping someone could help me out or point me in the right direction.
As documented
- application:didReceiveRemoteNotification:fetchCompletionHandler:
by Apple, there is not much you can do:
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.
It is done so that users could stop unwanted notifications
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With