Location streaming onto Live Activity

Hello forum,

I want to keep my app running in the background after user swaps up, for the purpose of workout tracking.

  • start up the task and continuously receipt GPS updates
  • process the location data
  • show the data on a live activity

Two examples

  • Strava
  • paddlelogger

Question:

  • Does this mean, these two apps would just pause when the .backgroundTimeRemaining becomes 0?
  • How does a workout app "work" in background mode, do I need to handle budget running out?

While we cannot comment on how other apps may have implemented their solutions, if you want your app to be able to continue receiving location updates after the user force closes it (which is what assume you mean by user swaps up), you would want to look at implementing your app using CLBackgroundActivitySession

If you are specifically asking about watchOS Workout apps, you can use a Workout Session as long as your app is a workout app, which will give you background runtime as explained in the link I provided.


Argun Tekant /  DTS Engineer / Core Technologies

yes, my app is a workout app. The workout session link didn't work for me. Could you paste the URL as txt?

Location streaming onto Live Activity
 
 
Q