在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Polidea/RxBluetoothKit开源软件地址:https://github.com/Polidea/RxBluetoothKit开源编程语言:Swift 98.5%开源软件介绍:RxBluetoothKit is a Bluetooth library that makes interaction with BLE devices much more pleasant. It's backed by RxSwift and CoreBluetooth and it provides nice API, for both Central and Peripheral modes. All to work with and make your code more readable, reliable and easier to maintain. Here is a sneak peek of what you can do with RxBluetoothKit: manager.scanForPeripherals(withServices: [serviceId])
.take(1)
.flatMap { $0.peripheral.establishConnection() }
.flatMap { $0.discoverServices([serviceId]) }
.flatMap { Observable.from($0) }
.flatMap { $0.discoverCharacteristics([characteristicId]) }
.flatMap { Observable.from($0) }
.flatMap { $0.readValue() }
.subscribe(onNext: { print("Value: \($0.value)") }) With just 9 lines it started scanning, connecting to the peripheral, discovering service and characteristics and read charecteristic's value! Central mode features
Peripheral mode features
Recent Changes6.0.0
Want to migrate from 4.x to 5.x? Check guidelines here. InstallationCocoaPodsCocoaPods is a dependency manager for CocoaProjects.
To integrate RxBluetoothKit into your Xcode project using CocoaPods specify it in your pod 'RxBluetoothKit' Then, run the following command:
CarthageCarthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
To integrate RxBluetoothKit into your Xcode project using Carthage specify it in your github "Polidea/RxBluetoothKit" Then, run Swift Package ManagerVersions >= 4.0 of the library integrate with the Swift Package Manager. In order to do that please specify our project as one of your dependencies in Getting StartedCheck our Wiki with guidelines to (almost) all library functionalites. Documentation & Support
Remember to follow Polidea's Blog blog to get all the news and updates! Learn more about Polidea's BLE services here. Requirements
Swift versions
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论