![]() First release This sample demonstrates how to use WKRefreshBackgroundTask to update WatchKit apps in the background. |
||
---|---|---|
.. | ||
WatchBackgroundRrefresh | ||
WatchBackgroundRrefresh WatchKit App | ||
WatchBackgroundRrefresh WatchKit Extension | ||
WatchBackgroundRrefresh.xcodeproj | ||
LICENSE.txt | ||
README.md |
README.md
WatchBackgroundRrefresh: Using WKRefreshBackgroundTask to update WatchKit apps in the background
This sample demonstrates a common background refresh pattern:
- First schedule an application task by pressing the button on the UI
- Now background the app using the crown
- Wait for that applicaiton task to arrive
- Using the application task's runtime, start a background URL session to download a file
- When that file arrives, update the label on the UI to the current time and schedule a snapshot
- 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.