Marks the task as complete and indicates whether the system should take a new snapshot of the app.
- watchOS 4.0+
A Boolean value that indicates whether the system should take a new snapshot of the app.
Call this method as soon as a nonsnapshot background task (any
WKRefresh subclass except the
WKSnapshot class) is complete.
To update the app's snapshot in response to the current task, pass
true, and the system schedules an immediate snapshot. This request counts against the standard snapshot budget and overwrites any requests made using the
schedule method. As with all snapshots, your app receives a
WKSnapshot before the snapshot is taken.
The system provides your extension with a limited amount of time (on the order of seconds) to finish this task. If you do not call
set on the task, the system continues to run in the background until all available time is consumed, wasting battery power.
The system suspends the extension as soon as all background tasks are complete.
When completing a snapshot background task, you generally call the
setmethod and explicitly set the date for the next snapshot. You can call
set as a simpler alternative. If you pass
true, the system schedules a new snapshot task in one hour. If you pass
false, no snapshot is scheduled.