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 4 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
  • cloud - module for cloud services - turn off when initialising the SDK (more info below) There could be other modules in the future. Stay tuned for the updates.

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

SDK cocoapod dependencies

  • Moya - pod 'Moya/RxSwift' - used for cloud services
  • GzipSwift - pod 'GzipSwift' - used for cloud services
  • iOSDFULibrary - pod 'iOSDFULibrary' - used for DFU (device firmware update)
  • ZIPFoundation - pod 'ZIPFoundation' - used for DFU (device firmware update)
  • RealmSwift - pod 'RealmSwift' - used as database

We are aware that you currently need to add cloud cocoapod depencencies to the project even though you will not use the cloud services. We plan on seperating the CloudSDK from the CorsanoSDK asap.

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)