Integrating Apple Fitness+ Workouts – How to Retrieve Metadata?

Platform & Version:

iOS Version: 18.3.1 Development Environment: Xcode 16.2, macOS 14.6.1 Description of the Issue:

We're exploring ways to better integrate Apple Fitness+ workouts into our app. We've noticed that some third-party apps, such as Strava and HealthFit, now display Fitness+ workout details, including the title, trainer, and an image.

I’ve been investigating how this is possible, and the only relevant change I’ve found is that HKMetadataKeyAppleFitnessPlusCatalogIdentifier is now being set for Fitness+ workouts. However, I can’t find any public API or official documentation that explains how to use these identifiers to retrieve the associated workout details.

Question:

Is there an official API available to fetch metadata for Fitness+ workouts using these identifiers? Or are these third-party apps potentially accessing private APIs? If no API exists, is the only option to create a manual mapping of these identifiers—something that seems impractical given the constantly evolving Fitness+ workout catalog?

Any guidance on this would be greatly appreciated. Thanks!

Answered by DTS Engineer in 826969022

I can't comment third-party apps, but by looking into HkMetadata, I only see HKMetadataKeyAppleFitnessPlusSession, which is an NSNumber containing a BOOL value indicating whether or not a workout is from Apple Fitness+, and HKMetadataKeyAppleFitnessPlusCatalogIdentifier, which is a string containing the catalog identifier of the Fitness+ workout. I hence would suggest that you file a feedback report to request APIs for retrieving the information you need – If you do so, please share your report ID here for folks to track.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Accepted Answer

I can't comment third-party apps, but by looking into HkMetadata, I only see HKMetadataKeyAppleFitnessPlusSession, which is an NSNumber containing a BOOL value indicating whether or not a workout is from Apple Fitness+, and HKMetadataKeyAppleFitnessPlusCatalogIdentifier, which is a string containing the catalog identifier of the Fitness+ workout. I hence would suggest that you file a feedback report to request APIs for retrieving the information you need – If you do so, please share your report ID here for folks to track.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I will file a feedback report.

Thanks. Please share your report ID when you have it.

Just so we're clear, you are not currently aware of a way to get the Fitness+ workout image and name based on the HKMetadataKeyAppleFitnessPlusCatalogIdentifier?

That's right.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Integrating Apple Fitness+ Workouts – How to Retrieve Metadata?
 
 
Q