El Dude
El Dude

Reputation: 5618

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

Upvotes: 0

Views: 194

Answers (1)

Nofel Mahmood
Nofel Mahmood

Reputation: 908

For this use Background App Refresh if u r 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

Upvotes: 1

Related Questions