Skip to content

How can you use URLSession in a background refresh task #4

Description

@fruitcoder

I am writing a weather application which should provide some complications and after watching the WWDC video the slide at 20:51 states that you cannot use URLSession in a Background App Refresh task. If I understand your code, this is exactly what you do though and I would like to know if you had any problems with this?

AFAIK, the documented way to do this is schedule a url session background task to download the json, then decode it and store it (in your case in user defaults) and in the extension delegate's handle(:) schedule the next background task and reload the complications.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions