0

What is the approach to be taken to make an app pull some data from the internet (ie. the ESPN API) in the background at a scheduled time every day, then to have the app display a notification regarding that data (ie. scores, injuries, etc)?

I am just starting to learn iOS/Swift and want to learn more about the capabilities.

I've encountered Local vs Push notifications, and it seems that Local notifications were the right approach. I've looked into Background Fetch in iOS, but it seems to be not very consistent with regards to the data pull.

I imagine this to be similar to the news apps that updates in the background and gives headlines as a notification at a certain time of the day.

Any help or advice would be greatly appreciated!

Clarity
  • 1
  • 2
  • You are right, do it with the scheduled local notifications, eg. https://stackoverflow.com/questions/13773123/how-can-i-schedule-local-notification-for-the-following-scenario – Bence Pattogato Sep 15 '17 at 14:37
  • @BencePattogato Is it possible to schedule background fetches and have the local notifications be initiated after the fact? What if it isn't regular? – Clarity Sep 15 '17 at 19:57
  • About background task read [this](https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html) – Amir Shabani Sep 16 '17 at 08:56

0 Answers0