Learn-iOS-Swift-by-Examples/WatchBackgroundRefresh
Liu Lantao 7070c9bdea WatchBackgroundRefresh: Version 1.0, 2016-09-13
First release

This sample demonstrates how to use WKRefreshBackgroundTask to update WatchKit apps in the background.
2016-12-24 12:36:54 +08:00
..
WatchBackgroundRrefresh WatchBackgroundRefresh: Version 1.0, 2016-09-13 2016-12-24 12:36:54 +08:00
WatchBackgroundRrefresh WatchKit App WatchBackgroundRefresh: Version 1.0, 2016-09-13 2016-12-24 12:36:54 +08:00
WatchBackgroundRrefresh WatchKit Extension WatchBackgroundRefresh: Version 1.0, 2016-09-13 2016-12-24 12:36:54 +08:00
WatchBackgroundRrefresh.xcodeproj WatchBackgroundRefresh: Version 1.0, 2016-09-13 2016-12-24 12:36:54 +08:00
LICENSE.txt WatchBackgroundRefresh: Version 1.0, 2016-09-13 2016-12-24 12:36:54 +08:00
README.md WatchBackgroundRefresh: Version 1.0, 2016-09-13 2016-12-24 12:36:54 +08:00

README.md

WatchBackgroundRrefresh: Using WKRefreshBackgroundTask to update WatchKit apps in the background

This sample demonstrates a common background refresh pattern:

  1. First schedule an application task by pressing the button on the UI
  2. Now background the app using the crown
  3. Wait for that applicaiton task to arrive
  4. Using the application task's runtime, start a background URL session to download a file
  5. When that file arrives, update the label on the UI to the current time and schedule a snapshot
  6. When the snapshot completes, check the dock and you'll see the new timestamp

Schedule runtime -> do some work -> snapshot your UI

Requirements

Build

Xcode 8.0 or later; iOS 10.0 SDK or later, watchOS 3.0 SDK or later

Runtime

iOS 10.0 or later, watchOS 3.0 or later

Copyright (C) 2016 Apple Inc. All rights reserved.