简体   繁体   中英

ios app - regular update from background(?) mode

I want my app to run http based weather requests in the background of my app. I believe I cant use push notifications because I would have to track the weather at the user specific geolocation and at some other user specific spots they follow. Thus it would be better if the individual app could automatically request all data itself every hour. Can somebody please point me into the right direction how this is solved? Thanks EL

For this use Background App Refresh if ur targeting ios7 and above . Here's a tutorial how to enable it in your app and call a method to update in background.

Background App Refresh Tutorial

But you cannot control that your app automatically wakes up to fetch data every hour because background app refresh doesn't allow this to happen. The OS itself gives time to perform and execute a specific method which has been registered depending on the frequency of your app use. And users can also switch off background app refresh for your app in settings of iOS

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM