Installation

Android

Add the SDK dependency to your module’s build.gradle.kts:

dependencies {
    implementation("com.bagid:bagid-sdk:<version>")
}

The SDK is published to Maven Central. Transitive dependencies are resolved automatically.

Minimum requirements

  • minSdk: 29 (Android 10)

  • compileSdk: 36

  • Kotlin 2.0+

iOS

Add the SDK via Swift Package Manager:

https://github.com/bagid/bagid-ios-sdk

The package delivers BagIdSDK as a pre-built XCFramework generated from the Kotlin Multiplatform SDK.

Minimum requirements

  • iOS 15+

  • Swift 5.9+

  • Xcode 15+

Kotlin to Swift architecture

The SDK core is implemented in Kotlin Multiplatform. On iOS:

  • Kotlin APIs are exposed to Swift through SKIE-generated bridges

  • Coroutines and Flow map to Swift async patterns

  • The delivered artifact is an XCFramework consumed through SPM

Bluetooth permissions

The SDK does not handle BLE permissions or Bluetooth state UI. Your app must request permissions before calling scanForEbtTags().

Android

Declare in AndroidManifest.xml:

<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<!-- Required on Android < 12 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Request permissions at runtime before scanning:

val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
    arrayOf(Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT)
} else {
    arrayOf(Manifest.permission.ACCESS_FINE_LOCATION)
}

iOS

Add to Info.plist:

<key>NSBluetoothAlwaysUsageDescription</key>
<string>Required to communicate with BagID baggage tags</string>

Bluetooth state handling

Provide user-facing feedback when Bluetooth is unavailable, turned off, or unauthorized. The SDK emits scan errors, but it is the host app’s responsibility to guide the user.