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 : NSObject
Swift
class VLDAPIClient : NSObject
-
Class providing basic date formatters
See moreDeclaration
Objective-C
@interface VLDFormatter : NSObject
Swift
class VLDFormatter : NSObject
-
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
Swift
class VLDLogging : NSObject
-
Base class for all model objects.
Declaration
Objective-C
@interface VLDModel : NSObject <NSCoding, NSCopying>
Swift
class VLDModel : NSObject, NSCoding, NSCopying
-
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 -
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 -
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 : NSObject
Swift
class VLDSession : NSObject