Skip to content
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

[5.0] monitorDisconnection on Peripheral instance should return the error to the user #170

Closed
Kacper20 opened this issue Oct 23, 2017 · 1 comment
Assignees
Milestone

Comments

@Kacper20
Copy link
Contributor

Currently method signature for monitorDisconnection looks as follows:
public func monitorDisconnection(for peripheral: Peripheral) -> Observable<Peripheral>
Delegate callback that is used to implement this contains additional information regarding the error which is currently ommited by our library.

Design

Ideally we would change the interface to the following one:

typealias DisconnectionReason = Error?
public func monitorDisconnection(for peripheral: Peripheral) -> Observable<(Peripheral, DisconnectionReason)>

How it affects current users

It’s a source breaking change and should be a part of 5.0 release.

@Kacper20
Copy link
Contributor Author

Implemented in #175 Thanks @bartoszstelmaszuk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants