Skip to content
DiveComputerKit

Talk to dive computers from your own app.

DiveComputerKit connects to dive computers over Bluetooth Low Energy. It downloads the logbook and returns typed dives. It uses libdivecomputer for the device protocols.

DownloadDives.swift
import DiveComputerKit

let diveComputer = try DiveComputer()

// Scan, then connect to the first computer in range.
let found = await diveComputer.scanDevices(timeout: 10)
let device = try await diveComputer.connect(to: found[0])

// Dives arrive as they download, parsed and typed.
for try await dive in device.downloadDives(fingerprint: last) {
    print(dive.number, dive.maxDepth, dive.samples.count)
}

100+

dive computer models

3

platforms

Use it in your app

A license covers a library, one license per app. Tell us what you build. You get a quote, the terms, and access to the package.