Installation
BioSDK is distributed as a pre-built binary XCFramework via Swift Package Manager.
Swift Package Manager
Xcode
- Open your project in Xcode
- File > Add Package Dependencies...
- Enter the repository URL:
https://github.com/anybio/biosdk-ios-binary.git - Select version rule: Up to Next Major from
2.0.0 - Add the BioSDK product to your app target
Package.swift
dependencies: [
.package(url: "https://github.com/anybio/biosdk-ios-binary.git", from: "2.0.0"),
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "BioSDK", package: "biosdk-ios-binary"),
]
),
]
Info.plist Setup
Bluetooth Permissions (Required)
BioSDK uses CoreBluetooth to communicate with wearables. Add the Bluetooth usage description to your Info.plist:
<key>NSBluetoothAlwaysUsageDescription</key>
<string>We use Bluetooth to connect to your wearable and stream health data.</string>
Background Modes (Recommended)
For long-running biosignal capture that continues when your app is backgrounded, enable these background modes:
<key>UIBackgroundModes</key>
<array>
<string>bluetooth-central</string>
<string>processing</string>
<string>remote-notification</string>
</array>
Register the SDK's background task identifiers:
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>io.anybio.upload</string>
<string>io.anybio.session.maintenance</string>
</array>
See the Background Mode guide for more details.
Requirements
| Requirement | Version |
|---|---|
| iOS | 16.0+ |
| Swift | 5.9+ |
| Xcode | 15.0+ |