steamclock / bluejay

A simple Swift framework for building reliable Bluetooth LE apps.
MIT License
1.09k stars 98 forks source link

Write doesn't fail if the wrong type is passed #263

Open DantePuglisi opened 2 years ago

DantePuglisi commented 2 years ago

Summary: 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.

Steps to Reproduce:

  1. Call bluejay.write passing a CharacteristicIdentifier and either .withResponse or .withoutResponse as its type (pass the one that doesn't correspond to what that characteristic has as its writeProperty).

Actual Result: Callback from write is success even if the wrong CBCharacteristicWriteType is passed.

Expected Result: Callback from write should be fail if the wrong CBCharacteristicWriteType is passed.

Device, Build, OS: iPhone 13 Pro - iOS 15.4.1

DantePuglisi commented 2 years ago

Just pushed a Pull Request to fix this #264