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

Challenge: A background app

From the course: Apple watchOS App Development: Advanced APIs

Start my 1-month free trial

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.

Contents