Skip to content

Commit d979911

Browse files
committed
Updated version of library to 3.0.5. README.md fixes.
1 parent d42033b commit d979911

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
# 3.0.5
3+
- Fixed bug when `options` dictionary was not being passed to `BluetoothManager` when initializing it
4+
- Updated README.md to use `Observable.from` in correct way
5+
26
# 3.0.4
37
- Updated RxSwift dependency version to 3.0.0
48
- Updated Nimble dependency version to 5.1

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ Because all of wanted services are discovered at once, method returns `Observabl
135135
Here's how it works in RxBluetoothKit:
136136
```swift
137137
peripheral.connect()
138-
.flatMap { Observable.from($0.discoverServices([serviceId])) }
138+
.flatMap { $0.discoverServices([serviceId]) }
139+
.flatMap { Observable.from($0) }
139140
.subscribeNext { service in
140141
print("Discovered service: \(service)")
141142
}
@@ -147,8 +148,10 @@ This time API's returning `Observable<[Characteristic]>` and to process one
147148
characteristic at a time, you need to once again use `Observable.from()`
148149
```swift
149150
peripheral.connect()
150-
.flatMap { Observable.from($0.discoverServices([serviceId])) }
151-
.flatMap { Observable.from($0.discoverCharacteristics([characteristicId])}
151+
.flatMap { $0.discoverServices([serviceId]) }
152+
.flatMap { Observable.from($0) }
153+
.flatMap { $0.discoverCharacteristics([characteristicId])}
154+
.flatMap { Observable.from($0) }
152155
.subscribeNext { characteristic in
153156
print("Discovered characteristic: \(characteristic)")
154157
}
@@ -160,8 +163,10 @@ In order to do that, you should use `readValue()` function defined on `Character
160163
We decided to return `Characteristic` instead of `NSData` due to one purpose - to allow you chain operations on characteristic in easy way.
161164
```swift
162165
peripheral.connect()
163-
.flatMap { Observable.from($0.discoverServices([serviceId])) }
164-
.flatMap { Observable.from($0.discoverCharacteristics([characteristicId])}
166+
.flatMap { $0.discoverServices([serviceId]) }
167+
.flatMap { Observable.from($0) }
168+
.flatMap { $0.discoverCharacteristics([characteristicId])}
169+
.flatMap { Observable.from($0) }
165170
.flatMap { $0.readValue() }
166171
.subscribeNext {
167172
let data = $0.value

RxBluetoothKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RxBluetoothKit"
3-
s.version = "3.0.4"
3+
s.version = "3.0.5"
44
s.summary = "Bluetooth library for RxSwift"
55

66
s.description = <<-DESC

0 commit comments

Comments
 (0)