Appearance
License
The BiosenseSignal SDK uses a licensing mechanism to protect against unauthorized usage, and to grant measurement permissions specified in the license agreement.
License Types
The following license types are available:
Using the License Key
A valid license key must be provided in order to initiate a measurement session or activate a user.
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);
}WARNING
The application must secure the license key and prevent it from being exposed to 3rd parties.
Receiving License Updates
The SDK sends a LicenseInfo object that contains:
- Offline Measurements Info - An object with information about offline measurements
- Activation ID - An object with the license activation information capabilities
The application can receive license-related messages by implementing onLicenseInfo as part of SessionInfoListener:
Swift
func onSessionStateChange(sessionState: SessionState) {
// Receive session state updates
}
func onWarning(warningData: WarningData) {
// Receive warnings
}
func onError(errorData: ErrorData) {
// Receive errors
}
func onLicenseInfo(licenseInfo: LicenseInfo) {
// Receive license info
}
func onEnabledVitalSigns(enabledVitalSigns: SessionEnabledVitalSigns) {
// Receive the enabled vital signs for the session
}Objective-C
- (void)onSessionStateChangeWithSessionState:(BIOSessionState *)sessionState {
// Receive session state updates
}
- (void)onWarningWithData:(BIOWarningData *)warningData {
// Receive warnings
}
- (void)onErrorWithData:(BIOErrorData *)errorData {
// Receive errors
}
- (void)onLicenseInfoWithInfo:(BIOLicenseInfo *)licenseInfo {
// Receive license info
}
- (void)onEnabledVitalSignsWithEnabledVitalSigns:(BIOEnabledVitalSigns *)enabledVitalSigns {
// Receive the enabled vital signs for the session
}License Server Network Routing
The SDK connects with the license server at https://licensing-api.biosensesignal.com. The traffic to this server is routed through a Cloudflare service. Since Cloudflare is inaccessible in certain countries, a custom workaround is available for these regions. Contact our customer support if the license server is unreachable in your target territories.