Skip to content

Commit 419257e

Browse files
authored
Add watchOS targets (#1133)
1 parent 5d331d9 commit 419257e

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

kable-core/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ kotlin {
2424
iosX64()
2525
macosArm64()
2626
macosX64()
27+
watchosArm64()
28+
watchosSimulatorArm64()
29+
watchosDeviceArm64()
2730
}
2831

2932
androidTarget().publishLibraryVariants("debug", "release")
@@ -37,6 +40,7 @@ kotlin {
3740
optIn("com.juul.kable.ExperimentalApi")
3841
optIn("kotlin.js.ExperimentalWasmJsInterop")
3942
optIn("kotlin.uuid.ExperimentalUuidApi")
43+
optIn("kotlinx.cinterop.UnsafeNumber")
4044
}
4145
}
4246

kable-core/src/appleMain/kotlin/CBPeripheralCoreBluetoothPeripheral.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ internal class CBPeripheralCoreBluetoothPeripheral(
306306

307307
is NSNumber -> when (updatedDescriptor.isUnsignedShortValue) {
308308
true -> value.unsignedShortValue.toByteArray(LittleEndian)
309-
false -> value.unsignedLongValue.toByteArray(LittleEndian)
309+
false -> value.unsignedLongLongValue.toByteArray(LittleEndian)
310310
}.toNSData()
311311

312312
// This case handles if CBUUIDL2CAPPSMCharacteristicString is `UInt16`, as it is unclear

kable-log-engine-khronicle/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ kotlin {
2121
iosX64()
2222
macosArm64()
2323
macosX64()
24+
watchosArm64()
25+
watchosSimulatorArm64()
26+
watchosDeviceArm64()
2427
}
2528

2629
js().browser()

0 commit comments

Comments
 (0)