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
-
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