-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation update #218
Documentation update #218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 👍
```swift | ||
manager.rx_state | ||
manager.observeState | ||
.startWith(manager.state) | ||
.filter { $0 == .poweredOn } | ||
.timeout(3.0, scheduler) | ||
.take(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this take(1)
is not needed. There won't be more than 1 event due to ensure(.poweredOn
in CentralManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, question is, it is possible that CoreBluetooth
will send poweredOn
twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I think CoreBluetooth sends this state each time user re-enable bluetooth in his device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but when it sends poweredOn
, poweredOff
, poweredOn
then subscription is disposed due to poweredOff
so poweredOn
won't be called.
Problem might be when we will receive poweredOn
, poweredOn
, than without take(1)
we will 2x start scanning.
@@ -73,13 +76,13 @@ public class Peripheral { | |||
return peripheral.state == .connected | |||
} | |||
|
|||
/// Current state of `Peripheral` instance described by [CBPeripheralState](https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheral_Class/#//apple_ref/c/tdef/CBPeripheralState). | |||
/// Current state of `Peripheral` instance described by [CBPeripheralState](https://developer.apple.com/documentation/corebluetooth/cbperipheralstate). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
d0a1ffb
to
9f76d27
Compare
9f76d27
to
ab90d44
Compare
Updated Readme file and code comments to match api changes.