Background Tasks

Hello, In my app, I have a timer. When the app is in the foreground, everything is good. Timer runs. When the app goes to background, the timer stops. This is surely the iOS shuts down the app. I read multiple documents and pages about the background tasks and background task strategies. However, none of them are able to describe a scenario which is similar to Apple’s Stopwatch or Alarm or Timer. How can I achieve a similar functionality? Thanks.

This is surely the iOS shuts down the app.

It doesn’t necessarily terminate the app. Typically, you’ll find that it suspends the app. It may later resume it or, if the system needs memory, remove it from memory.

However, none of them are able to describe a scenario which is similar to Apple’s Stopwatch or Alarm or Timer. How can I achieve a similar functionality?

Use a local notification. For more background (hey hey) on this, see iOS Background Execution Limits.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Background Tasks
 
 
Q