Skip to main content

Overview

Corsano iOS SDK allows you to interact with Corsano Smartwatch bracelet.

Sample App

Sample app together with the SDK can be found in our GitHub repository.

Note: The access to sample app is currently restricted. Please request access by writing to our email: info@corsano.com

Main topics

  • 🚀 Getting Started
  • 🧭 Developer Guides
  • 📖 Change Log
  • 🧑🏼‍💻 DataModels Summaries iOS
  • 🧑🏼‍💻 DataModels Raw iOS

Change log

Please go to our GitHub to see up-to-date change log. If you have not been in contact with us you will see a 404 page. Please request access by writing to our email: info@corsano.com

Reporting issues and feedback

If you find an issue in our SDK or documentation or just want to share your feedback, do not hesitate to create an issue on our GitHub repository.

Structure of iOS SDK

This article will describe the main structure of SDK, how to include and use it in your project. For more information and usage examples please refer to sample app source code.

Corsano SDK currently consists of 3 main modules:

  • ble – module for connecting to BLE device and performing commands, may be also used for getting raw data (cannot be used directly)
  • data - module for retrieving and storing data and calculating summaries
  • dfu - module for performing device firmware upgrades

Note: If you'd like to work with lower level commands, then ble module will be enough.

SDK cocoapod dependencies

  • iOSDFULibrary - pod 'iOSDFULibrary' - used for DFU (device firmware update)
  • ZIPFoundation - pod 'ZIPFoundation' - used for DFU (device firmware update)
  • RealmSwift - pod 'RealmSwift' - used as database

Adding the library to you project

The preview is currently under the ExtFrameworks folder in the project, but we are working on publishing and distributing via cocoapods. We also included the Philips sleep library LibFXC.framework, which needs to be added to your project. If you have any build errors regarding realm framework, please also include the realm xcframeworks in your project.

SDK initialisation

Initialisation of all SDK modules is performed through a few calls which need to be in your AppDelegate to be started on launch. We suggest you create a singleton class for access to the SDK:

Basic SDK initialization:

private var sdk = CorsanoSDKObject(withCloudService: false)
sdk.startBLE()
sdk.startRealm(slotSettings: .sdkDefault)

If you want to disable metrics summary and only use metrics raw data, you can disable summaries option:

private var sdk = CorsanoSDKObject(withCloudService: false)
sdk.startBLE()
sdk.startRealm(slotSettings: .sdkDefault, withSummaries: false)

Per default, we wait to fill the WIFF file with: 500’000 bytes (PPG), 30’000 bytes (BioZ and ACC) before making it available. But if you want to build WIFF files continuously for PPG2/ACC/BIOZ you can set following options:

(You can set a specific Int value if you want instead of using emum values)

private var sdk = CorsanoSDKObject(withCloudService: false)
sdk.startBLE()
sdk.startRealm(slotSettings: .sdkDefault,
PPG2ThresholdFileSize: FileThreshold.continuous.rawValue,
BioZThresholdFileSize: FileThreshold.continuous.rawValue,
ACCThresholdFileSize: FileThreshold.continuous.rawValue)