Skip to content

bwake2012/BackgroundFetchDemo

Repository files navigation

BackgroundFetchDemo

Background Fetch Demo Screenshot

This is a program to demonstrate the new BackgroundTasks framework in iOS.

I read a number of articles about the new framework:

It also borrows from the sample by Apple: Refreshing and Maintaining Your App Using Background Tasks

I have tried to separate management of the background task(s) from both AppDelegate and SceneDelegate. I have also tried to separate the actual task execution from its management.

It saves the results of its fetches in an array, which it writes to a JSON file. It displays the array of results in a UITableView. It includes a way to manually fetch a random Pokémon. It includes pull-to-refresh to update the display, just in case.

I added a Today widget to display the results of the most recent fetch without actually loading the application.

It took me a while to be certain that it works. It's interesting that Apple's (ColorFeed) demo doesn't make any network calls. Andy Ibanez's sample doesn't appear to fetch Pokémon either.

I did make old style background fetch work in my TodayWidgetDemo.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages