Skip to content

Commit

Permalink
#161 Fix LowEnergyAdvertisingData.init(beacon:flags:)
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Nov 5, 2024
1 parent 9efbac0 commit e75bce2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/BluetoothGAP/iBeacon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ public extension LowEnergyAdvertisingData {

init(beacon: AppleBeacon,
flags: GAPFlags = [.lowEnergyGeneralDiscoverableMode, .notSupportedBREDR]) {

let encoder = GAPDataEncoder<LowEnergyAdvertisingData>()
let manufacturerData = AppleBeacon.ManufacturerData(beacon) // storage on stack
self = encoder.encode(flags, manufacturerData)
self = GAPDataEncoder.encode(flags, manufacturerData)
}
}

Expand Down

0 comments on commit e75bce2

Please sign in to comment.