Returns a HealthKit unit for measuring mass in moles for a given molar mass.
- iOS 8.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
The molar mass (in g/mol) of the item to be weighed.
A HealthKit unit for measuring the mass of an item in moles.
To create a unit for measuring an item in moles, you need to know that item’s molar mass. For example, you can use the
HKUnit constant to create the mole unit for blood glucose, as shown below.