HealthKit apps cannot write Activity summaries to Health.app

Originator:dloewenherz
Number:rdar://29144768 Date Originated:07-Nov-2016 03:07 PM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 10.0
Classification:Documentation Reproducible:Always
 
Summary:
See title. I maintain an app that lets users import their Health XML data to their iPhones (http://lionheartsw.com/software/health-importer/). Due to this limitation, this app is unable to import all of their data.

Steps to Reproduce:
1. Navigate to the HKActivitySummary documentation. Link: https://developer.apple.com/reference/healthkit/hkactivitysummary
2. Look for documentation on this page on how to save activity summaries to the user's local health store.

Expected Results:
There is documentation and an an API that allows developers to write Activity Summaries to Health.app.

Actual Results:
You cannot save HKActivitySummary types to Health.app. From the documentation: "You can instantiate your own HKActivitySummary objects (if needed), but you cannot save HKActivitySummary objects to the store."

Version:
iOS 10.1.1

Notes:


Configuration:
iPhone SE 64 GB T-Mobile

Attachments:

Comments

Daniel Loewenherz

Hi folks, thanks for the follow-up. However, I don't think this is correct, maybe I just need some clarification. See rdar://29144669. The activity types mentioned in that radar are the ones used to generate the activity summaries, so if I can't write those data points, how can I contribute to the rings?

By dloewenherz at Dec. 14, 2016, 3:14 p.m. (reply...)

Apple Developer Relations

Engineering has determined that this issue behaves as intended based on the following information:

This is intended. Activity summaries are a summary, computed based on other information saved into HealthKit (such as workouts). Third party apps can contribute to the rings per our documentation but there is no intention of allowing them to be written directly.

By dloewenherz at Nov. 15, 2016, 6:14 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!