Skip to main content

Installation

BioSDK is distributed as a pre-built binary XCFramework via Swift Package Manager.

Swift Package Manager

Xcode

  1. Open your project in Xcode
  2. File > Add Package Dependencies...
  3. Enter the repository URL:
    https://github.com/anybio/biosdk-ios-binary.git
  4. Select version rule: Up to Next Major from 2.0.0
  5. 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>

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

RequirementVersion
iOS16.0+
Swift5.9+
Xcode15.0+