From the course: Apple watchOS App Development: Advanced APIs
Unlock the full course today
Join today to access over 22,800 courses taught by industry experts or purchase this course individually.
Challenge: A background app
From the course: Apple watchOS App Development: Advanced APIs
Challenge: A background app
(light drum cymbals) - [Instructor] Okay, it's time for a challenge. In our last example, I shut down the timer when the app went inactive. That stopped the counter until I started it up again. What if I wanted to only update the display when I was in the active state, but keep counting? Here's a challenge for you. Rewrite the timer app so it runs in the background, but doesn't update the display unless it is active.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Frontmost app state4m 24s
-
(Locked)
The dock and the background states5m 15s
-
(Locked)
The extension delegate7m 25s
-
(Locked)
Challenge: A background app27s
-
(Locked)
Solution: A background app2m 38s
-
Refresh app in the background6m 57s
-
(Locked)
userInfo in background apps7m 48s
-
(Locked)
Update interface with snapshot8m 16s
-
(Locked)
Default snapshots4m 54s
-
(Locked)
-
-
-
-