Home How much runtime does an app get when it receives a Pushkit Voip Push?
Reply: 0

How much runtime does an app get when it receives a Pushkit Voip Push?

user1566
1#
user1566 Published in May 20, 2018, 10:04 am

If an app is in the background or terminated and it receives a voip push then the OS will launch it and run it.

The documentation says:

"Your app is given runtime to process a push, even if your app is operating in the background."

Does anybody know how long this runtime is and if the app can find out how long there is remaining?

If an an app is in the foreground and moves to the background, then if it uses beginBackgroundTask() etc. it can get 30 seconds of execution time.

I've conducted experiments and found that if a silent push is delivered to the app when it is already in the background then the app can also use beginBackgroundTask() in that situation and it also get 30s seconds in which to execute and do something when it receives the push (and it can use UIApplication.shared.backgroundTimeRemaining to see how much time there is remaining.)

BUT if a Voip push is delivered instead of a silent push then beginBackgroundTask() functionality does not work (and of course therefore UIApplication.shared.backgroundTimeRemaining cannot be used to determine remaining execution time), however the app can run in the background and perform some activity (which is what the documentation quoted above says it can do).

So to repeat the question - is it documented by Apple how much time it does get to run when it receives the Voip push? Can the app find out how much time there is remaining? Or get some waring that execution time is about to expire?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306856 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO