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

Make WriteCharacteristic fail if types mismatch #264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DantePuglisi
Copy link

Fixes #263:

Summary of Problem:

There's no way to know if a characteristic has the specified CBCharacteristicWriteType when calling write because if it doesn't, success is returned instead of fail.

Proposed Solution:

In WriteCharacteristic we check that the CBCharacteristic has the passed type as a property, if it doesn't we fail the write.

Testing Completed and Required:

Calling write with a mismatched CBCharacteristicWriteType executes the fail callback.

@sakuraehikaru
Copy link

Thank you for submitting this pull request. This looks good to me, but I would like to also get our senior engineer to have a look as well. @nbrooke when you have time can you also review this PR? Thanks.

@DantePuglisi
Copy link
Author

DantePuglisi commented Jun 9, 2022

Any updates on this? @sakuraehikaru @nbrooke

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

Successfully merging this pull request may close these issues.

Write doesn't fail if the wrong type is passed
2 participants