Classes

The following classes are available globally.

  • VLDHealthKitManager is the Validic Mobile interface for all HealthKit operations. VLDHealthKitManager is a singleton object that must be accessed through the sharedInstance method. Like the other components of the Validic Mobile library, VLDHealthKitManager requires a valid user session in the VLDSession singleton.

    VLDHealthKitManager can upload new records as they come in. Listening for new records is done by adding subscriptions for the desired sample types. This will automatically prompt the user for permission and setup background notifications for new data.

    Background delivery will happen on an hourly basis if new data is available. This will result in the data being uploaded in the background throughout the day. For background delivery to be successful you must call observeCurrentSubscriptions from your application delegate’s application:didFinishLaunchingWithOptions: callback.

    Notifications When VLDHealthKitManager queues records for upload it will send an NSNotification. To listen for this notification add an observer to the NSNotificationCenter with the constant kVLDHealthKitRecordsProcessedNotification. The userInfo dictionary for this notification will contain two keys, recordType and count. recordType will contain an NSNumber representing the integer value of the VLDRecordType enum and count will contain the number of records that were processed.

    See more

    Declaration

    Objective-C

    @interface VLDHealthKitManager : NSObject

    Swift

    class VLDHealthKitManager : NSObject
  • 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.

    See more

    Declaration

    Objective-C

    @interface VLDHealthKitSubscription

    Swift

    class VLDHealthKitSubscription