Trigger background task on silent notification receiving


#1

Hello,

I am trying push plugin. I am able to send a notification silently when the application is in background (content-available=1). I would like to trigger something (update some data) in the app when the notification is received without a user action. The next time user opens the application, data will be up-to-date.

Is this possible ?

(I have also tried background-fetch plugin. The problem is I can’t predict when iOS background fetch event will fire because it depends on user’s usage.)

Since iOS is very strict with background operation (and I understand why), I suppose it’s not possible to achieve what I want to do : a background task (without user action) when a silent notification is received.

But I need some confirmation :wink:

Thanks for your help.


#2

As you already mentioned, doesn’t seem possible with iOS.


#3

I found here (“Playing out the Scenarios” chapter, item n°2) it may be possible.


#4

I had a quick look at the given link, looks like still it will be restricted if app is not running already. Please do let us know incase if you could crack it somehow.