My application uses a backgroud fetch to send and upload a small portion of data every 30 minutes. The service is working correctly for about 10 - 14 hours after the application is minimized from working in the foregroud - the application is correctly sending and receiving the data every 30 minutes.
Does anyone know what happens with the service after couple of hours? Does the iOS system automatically terminate the application and therefore the background fetch stops working?
Can anyone explain?
iOS provides a 30 seconds time frame in order the app to be woken up, fetch new data, update its interface and then go back to sleep again. It is your duty to make sure that any performed tasks will manage to get finished within these 30 seconds, otherwise the system will suddenly stop them.
maybe the internet was slow that your app took more than 30 seconds & system stopped your application.
Also Apple provides an algorithm which defines how often the background fetch should trigger, based on your own usage of the app. If you use it a lot, then it will fetch as often as possible, but if you use like at 4pm every day, the background fetch should trigger just before, so your data is updated when you launch it.