VLDHealthKitSubscription
Objective-C
@interface VLDHealthKitSubscription
Swift
class VLDHealthKitSubscription
VLDHealthKitSubscription objects are used to specify what type of records to create from HealthKit data. They do this by containing a static mapping of VLDRecordType to HKSampleType objects.
-
Returns the VLDRecordType for a particular HKSampleType.
Declaration
Objective-C
+ (id)recordTypeForSampleType:(HKSampleType *)sampleType;
Swift
class func recordType(for sampleType: HKSampleType!) -> Any!
Parameters
sampleType
An HKSampleType to get the corresponding record type for.
-
Deprecated
Returns a list of HKSampleType objects that are mapped to a particular VLDRecordType value. This method is deprecated. Please use sampleTypesForSubscriptionSet.
Declaration
Objective-C
+ (NSSet<__kindof HKSampleType *> *)sampleTypesForRecordType:(id)recordType;
Swift
class func sampleTypes(forRecordType recordType: Any!) -> Set<HKSampleType>!
Parameters
recordType
A value of VLDRecordType to get sample types for.
-
Returns the HKUnit used to get the quantity for a sample.
Declaration
Objective-C
+ (HKUnit *)unitForQuantityTypeIdentifier:(NSString *)type;
Swift
class func unit(forQuantityTypeIdentifier type: String!) -> HKUnit!
Parameters
type
the type identifier for an HKSampleType.
-
Returns a string value that describes the Workout Activity.
Declaration
Objective-C
+ (NSString *)workoutActivityForType:(HKWorkoutActivityType)type;
Swift
class func workoutActivity(for type: HKWorkoutActivityType) -> String!
Parameters
type
the HKWorkoutActivityType to get the name for.
-
This returns an array of HKSampleTypes that are mapped to a VLDHealthKitSubscriptionSet value.
Declaration
Objective-C
+ (NSArray<__kindof HKSampleType *> *)sampleTypesForSubscriptionSet: (VLDHealthKitSubscriptionSet)subscriptionSet;
Swift
class func sampleTypes(for subscriptionSet: VLDHealthKitSubscriptionSet) -> [HKSampleType]!
Parameters
subscriptionSet
A value of VLDHealthKitSubscriptionSet to get sample types for.