Skip to content

Improvements to initialization, disconnection, and callback structures

Pre-release
Pre-release
Compare
Choose a tag to compare
@sakuraehikaru sakuraehikaru released this 06 Dec 17:57
· 44 commits to master since this release
3c9156a

Version 0.7.0 introduces several API-breaking changes and improvements:

  • Add StartMode to better encapsulate CBCentralManager initialization options
  • Add WarningOptions to better encapsulate connect warning options
  • Fix handling of expected and unexpected disconnections
  • Add disconnect handler to handle auto-reconnect
  • Remove all cancellation callbacks; use existing failure blocks and look for BluejayError.cancelled instead if you need to differentiate between a failure caused by cancellation versus a failure caused by other errors
  • Return Bluejay Peripheral instead of CBPeripheral for connect, disconnect, and RSSI observer callbacks; so that you don't have to import CoreBluetooth in many of your files anymore, and you can also get a "better/more suitable" peripheral object to work with
  • Fix a scan crash caused by not clearing the scan request's global timer
  • Remove set privileges on all public Bluejay instance variables; they are all supposed to be read only from the get go, but a few were settable and that was dangerous