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 moreDeclaration
Objective-C
@interface VLDAPIClient
-
Class providing basic date formatters
See moreDeclaration
Objective-C
@interface VLDFormatter
-
Undocumented
See moreDeclaration
Objective-C
@interface VLDLogging : NSObject // Enables or disbales loggin to the console @property(nonatomic) BOOL isEnabled; /* Mask to output debug messages from Validic Frameworks. Ex: [[VLDLogging sharedInstance] setLog:VLDLogBluetooth & VLDLogCore]; */ @property(nonatomic) NSUInteger log; /** sharedInstance returns the VLDLogging singleton and should be the only way VLDLogging is accessed. */ + (instancetype)sharedInstance; @end
-
Base class for all model objects.
Declaration
Objective-C
@interface 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
. Theobject
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
. Theobject
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
See morekVLDRecordImageSubmittedNotification
. Theobject
property of the notification will contain aVLDMedia
instance. If the image fails to upload an NSNotification will be sent out with the namekVLDRecordImageSubmissionFailedNotification
and theobject
property of the notification will be the record object associated with the image and theuserInfo
dictionary will contain a value for the keyerror
with the NSError object describing the problem.Declaration
Objective-C
@interface VLDSession
-
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
See morekVLDHealthKitRecordsProcessedNotification
. The userInfo dictionary for this notification will contain two keys,recordType
andcount
. recordType will contain an NSNumber representing the integer value of the VLDRecordType enum and count will contain the number of records that were processed.Declaration
Objective-C
@interface VLDHealthKitManager