HealthKit

Here’s How Third-Party Apple Watch Apps Can Track Workouts In watchOS 2

Next Story

Rhombus Lets Businesses Accept Payments By Text

Good news developers: You’re able to create native Watch apps that track a wearer’s activity, and can report back to Health with information about the workout, as well as remain active throughout the workout session just like Apple’s own native Workout app.

Thanks to new watchOS 2  workout APIs, third-party apps will gain access to activity and workout data. Watch apps also have access to the same existing iOS HealthKit APIs that they do on iPhone and iPad. Data saved to Watch apps will also automatically sync back to the paired companion device it works with, and workouts done on the watch will show up in your daily roundup in the iOS Activity app.

Apple’s keeping consistent on its privacy approach with Watch workouts; users willll have to grant apps permission to access their Health data and feed workout data back to the app, using a prompt that appears on both an iPhone and its connected Watch, on an app-by-app basis. Authorizations are shared between devices, however, which makes sense given that it’s highly unlikely a user would want to grant separate permissions in this area to both.

Developers can specify the activity type to improve tracking accuracy on Apple Watch, and their apps will remain in the foreground as mentioned, meaning a user wrist raise will activate whatever workout progress or summary view developers create for their app instead of the watch face. Post-workout, the watch face will gain supremacy as normal, unless a user has specified that the watch resume to the last open app, as they can do currently.

Only one active workout can run on an Apple Watch at any given time, which means that you wouldn’t be able to track a run in both Workout and, say, Runkeeper, were they to make a native app for the smartwatch. Whichever workout app was activated last will win out, too, in cases where you start another workout while one is already running.