From e75bce28ed18c14252db9951fae3907575d10ad0 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Mon, 4 Nov 2024 21:19:28 -0500 Subject: [PATCH] #161 Fix `LowEnergyAdvertisingData.init(beacon:flags:)` --- Sources/BluetoothGAP/iBeacon.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/BluetoothGAP/iBeacon.swift b/Sources/BluetoothGAP/iBeacon.swift index 8f1e74bcb..56aedcd44 100644 --- a/Sources/BluetoothGAP/iBeacon.swift +++ b/Sources/BluetoothGAP/iBeacon.swift @@ -86,10 +86,8 @@ public extension LowEnergyAdvertisingData { init(beacon: AppleBeacon, flags: GAPFlags = [.lowEnergyGeneralDiscoverableMode, .notSupportedBREDR]) { - - let encoder = GAPDataEncoder() let manufacturerData = AppleBeacon.ManufacturerData(beacon) // storage on stack - self = encoder.encode(flags, manufacturerData) + self = GAPDataEncoder.encode(flags, manufacturerData) } }