HealthKit should provide a way to store custom object types

Number:rdar://17257683 Date Originated:10-Jun-2014
Status:open Resolved:
Product:iOS SDK Product Version:8 beta
Classification: Reproducible:
From what I can gather from the WWDC 2014 presentation and the current SDK, HealthKit provides a fixed (and currently very limited) set of object types for apps to work with.

For example I can currently store a person's height, weight, blood type, number of steps, dietary calories, etc... But I have no way to store data types that Apple has not specifically built-into HealthKit, such as migraine attacks, pain location, triggers, medications taken, etc...

There is a LOT of different types of objects that would be very useful to store in HealthKit, many of which are likely to be missed.  As it stands today, my migraine app cannot make use of HealthKit because the data it is interested in is not provided by the object types that Apple defines in HealthKit.

If HealthKit provided a way to define custom objects types, more applications would be able to take advantage of HealthKit and more customers could benefit from this new platform.

Steps to Reproduce:
For example, this is how you instantiate a Quantity Type for dietary calories:

HKQuantityType *dietaryCalorieEnergyType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierDietaryCalories];

Apple defines HKQuantityTypeIdentifierDietaryCalories and the HKQuantityType object that will be created for dietary calories.  I would like to but currently have no way to create an HKQuantityType for a migraine attack.

Expected Results:
I don't know what would be the best way to provide custom object types, the current implementation of the HealthKit object type constructors is not publicly available.   

Perhaps something like:

registerQuantityTypeConstructor:(HKQuantityTypeConstuctor *constructor withIdentifier:(NSString *)identifier)

Where the HKQuantityTypeConstructor is the base class for a constructor class for a custom HealthKit object type.

Actual Results:
This is not possible today.

iOS 8 Beta 1


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!