Appearance
Measurement Modes
The SDK supports the following measurements modes:
Once a face session is created, the application can receive notification on the session state transitions, the allowed vital signs for the session and set the user demographic info.
Face Measurement
A face measurement is performed by creating a face session and facing the front (selfie) camera to the user's face.
Swift
do {
let licenseDetails = LicenseDetails(licenseKey: "<ENTER_YOUR_LICENSE_KEY>")
let session = try FaceSessionBuilder()
.withImageListener(self)
.withVitalSignsListener(self)
.withSessionInfoListener(self)
.build(licenseDetails: licenseDetails)
}
catch {
let e = error as NSError
print("Received Error. Domain: \(e.domain) Code: \(e.code)")
}Objective-c
BIOLicenseDetails *licenseDetails = [[BIOLicenseDetails alloc] initWithLicenseKey:@"<ENTER_YOUR_LICENSE_KEY>"];
BIOFaceSessionBuilder *sessionBuilder = [[[[[BIOFaceSessionBuilder alloc] init]
withImageListener:self]
withVitalSignsListener:self]
withSessionInfoListener:self];
NSError *error = nil;
id<BIOSession> _Nullable session = [sessionBuilder buildWithLicenseDetails:licenseDetails
error:&error];
if (error != nil) {
NSLog(@"Received Error. Domain: %@ Code: %ld", error.domain, (long)error.code);
}After creating the face session the application can receive the camera images, create camera preview, set the [device orientation] and enforce the image validity according to the measurement guidance.
Polar Measurement
A Polar measurement is conducted by creating a polar session and pairing the device with the Polar Verity Sense sensor.
Swift
do {
let licenseDetails = LicenseDetails(licenseKey: "<ENTER_YOUR_LICENSE_KEY>")
let deviceID = "<ENTER_POLAR_DEVICE_ID>"
let session = try PolarSessionBuilder(polarDeviceID: deviceID)
.withSessionInfoListener(self)
.withVitalSignsListener(self)
.withPPGDeviceInfoListener(self)
.build(licenseDetails: licenseDetails)
}
catch {
let e = error as NSError
print("Received Error. Domain: \(e.domain) Code: \(e.code)")
}Objective-c
BIOLicenseDetails *licenseDetails = [[BIOLicenseDetails alloc] initWithLicenseKey:@"<ENTER_YOUR_LICENSE_KEY>"];
NSString *deviceID = @"<ENTER_POLAR_DEVICE_ID>";
BIOSessionBuilder *sessionBuilder = [[[[[BIOPolarSessionBuilder alloc] initWithPolarDeviceID:deviceID]
withVitalSignsListener:self]
withSessionInfoListener:self]
withPPGDeviceInfoListener:self];
NSError *error = nil;
id<BIOSession> _Nullable session = [sessionBuilder buildWithLicenseDetails:licenseDetails
error:&error];
if (error != nil) {
NSLog(@"Received Error. Domain: %@ Code: %ld", error.domain, (long)error.code);
}The user must wear the Verity Sense device on the forearm and follow the best practices for taking a measurement using external devices.
The Polar Device ID can either be retrieved by the PPG Device Scanner or found on the Polar device as shown in the image below: 
Additional information regarding Polar Verity Sense can be found in Polar Verity Sense User Manual.