Classes

The following classes are available globally.

  • The API Client provides a convenient way to upload VLDRecord objects to Validic’s servers. It handles creating proper URLs, constructing the request object and parsing the server response.

    See more

    Declaration

    Objective-C

    @interface VLDAPIClient
  • Biometric Measurements are comprised of a user’s biometric health data such as blood pressure, cholesterol, heart rate, and blood and hormone levels.

    See more

    Declaration

    Objective-C

    @interface VLDBiometrics : VLDRecord
  • Diabetes Measurements are comprised of a user’s blood glucose and hormone levels related to diabetes treatment and management.

    See more

    Declaration

    Objective-C

    @interface VLDDiabetes : VLDRecord
  • Fitness records return data for activities that are undertaken with the express purpose of exercising. These activities have a defined duration (time, distance, elevation, etc.).

    See more

    Declaration

    Objective-C

    @interface VLDFitness : VLDRecord
  • Class providing basic date formatters

    See more

    Declaration

    Objective-C

    @interface VLDFormatter
  • Contains the ID and URL of an uploaded media record.

    See more

    Declaration

    Objective-C

    @interface VLDMedia : VLDModel
  • Base class for all model objects.

    Declaration

    Objective-C

    @interface VLDModel
  • Activities related to calorie intake and consumption and nutritional information (such as fat, protein, carbohydrates, sodium, etc.).

    See more

    Declaration

    Objective-C

    @interface VLDNutrition : VLDRecord
  • The VLDPeripheral class is an abstract class. You should never instantiate a VLDPeripheral object directly. Instead, you always work with one of its concrete subclasses: VLDBluetoothPeripheral or VLDOCRPeripheral.

    See more

    Declaration

    Objective-C

    @interface VLDPeripheral : VLDModel
  • Base class for all objects that represent health records.

    See more

    Declaration

    Objective-C

    @interface VLDRecord : VLDModel
  • Activities that occur regularly throughout the day, without the specific goal of exercise, for example calories burned and consumed, steps taken, stairs climbed. These activities are aggregate throughout the day.

    See more

    Declaration

    Objective-C

    @interface VLDRoutine : VLDRecord
  • VLDServerResponse class contains the code, messages and errors returned by the server along with the Activity ID of the submitted record

    See more

    Declaration

    Objective-C

    @interface VLDServerResponse : VLDModel
  • VLDSession stores a user, their current HealthKit subscriptions and all pending record uploads. This data is persisted between app launches but is deleted if endSession is called.

    VLDSession is a singleton object and must be accessed by its sharedInstance method. The different components of the Validic Mobile library rely on a valid user existing in the current VLDSession singleton object.

    ## Notifications ## When VLDSession uploads a record it will send an NSNotification. To listen for this notification add an observer to the NSNotificationCenter with the name kVLDRecordSubmittedNotification. The object property of the notification will contain the VLDRecord object uploaded.

    If a 400 error is returned from the server, the record will be discarded and an NSNotification will be posted. To listen for this notification add an observer to the NSNotificationCenter with the name kVLDRecordSubmissionFailedNotification. The object property of the notification will contain the invalid VLDRecord object. The userInfo dictionary for this notification will contain one key, error with the NSError object for the failed upload.

    When an image is uploaded VLDSession will send out an NSNotification with the name kVLDRecordImageSubmittedNotification. The object property of the notification will contain a VLDMedia instance. If the image fails to upload an NSNotification will be sent out with the name kVLDRecordImageSubmissionFailedNotification and the object property of the notification will be the record object associated with the image and the userInfo dictionary will contain a value for the key error with the NSError object describing the problem.

    See more

    Declaration

    Objective-C

    @interface VLDSession
  • Measurements related to the length of time spent in various sleep cycles, as well as number of times woken during the night.

    See more

    Declaration

    Objective-C

    @interface VLDSleep : VLDRecord
  • VLDUser stores the Validic User ID, Organization ID and Access Token of the User.

    See more

    Declaration

    Objective-C

    @interface VLDUser : VLDModel
  • Measurements associated with a user’s weight and body mass.

    See more

    Declaration

    Objective-C

    @interface VLDWeight : VLDRecord
  • 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
  • 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 : VLDModel