Releases: jordanebelanger/SwiftyBluetooth
Releases · jordanebelanger/SwiftyBluetooth
3.1.0
SwiftPM warning fix
3.0.1 SwiftPM related fixes
Xcode 13
Fix Xcode 13 related compatibility issues.
Fix peripheral disconnect not always firing
Fix peripheral disconnect not always firing
Add `Peripheral.PeripheralDisconnected` notificationcenter event on peripheral disconnection
You can now listen to Peripheral disconnection using the Peripheral.PeripheralDisconnected
notification center event.
You can listen to this notification roughly like this:
NotificationCenter.default.addObserver(forName: Peripheral.PeripheralDisconnected, object: peripheral, queue: nil) { (notif) in
if let peripheral = notif.object as? Peripheral {
print("Peripheral disconnected")
}
if let error = notif.userInfo?["error"] as? Error {
print("Peripheral disconnected with error")
}
}
Whereas peripheral
is an instance of Peripheral
.
Added SPM support
Added swift package manager support as well as compatibility with macos and tvos for both SPM and Cocoapods.
Thanks @levi !
2.0.0
Move to Swift 5.0, fix many warnings and use the now standard Swift Result type.
Swift 4
Moved to Swift 4
Result refactor + state restore
- Now using a Result enum type instead of optional Errors in callbacks
- Added state restoration
First Swift 3 compatible version
Updated documentations and all APIs to support swift 3