I have an app that do recursive calls to a API after every min or so it is working fine while app is active but not working when it is in background.
I tested the same app on android and even in the background it work fine, but on iOS it stop calling the API.
Am I missing something or what should I do to resolve it?
Any quick help please?
In January 2018 there are better options (hooray for progress!). This can now be done entirely in JS cross platform in react native using react native queue and react native background task .
Here's a walkthrough for setting this up.
However, there are limitations:
As of January 2017, you have a few options, but none are native for iOS right now—it's something they're working on . For Android (although it seems you have this solved) you can use Headless.js .
For iOS you have a few options, depending on your task:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.