Skip to content

Releases: NordicSemiconductor/IOS-CoreBluetooth-Mock

0.18.0

19 Feb 19:10
500b238
Compare
Choose a tag to compare

What's Changed

  • Bug fix: Update README.md - fixes typo in Core Bluetooth mock section by @adamrhunter in #105
  • Bug fix: Wrap CBPeripherals as CBMPeripheralNative on restore by @kennylovrin in #106
  • Bug fix: Remove peripheral after disconnect by @everlof in #102
  • Migration to Xcode 15.2 by @philips77 in #107
    • Minimum iOS and tvOS version set to 12
    • Minimum macOS version set to 10.14
    • PrivacyInfo added to the library
    • Doc typos fixed & (documentation) regeneration
  • Sample app: New launch screen by @philips77 in #108

New Contributors

Full Changelog: 0.17.0...0.18.0

0.17.0

30 Aug 20:38
Compare
Choose a tag to compare

KVO

isScanning and state of CentralManager and state of Peripheral are marked now as @objc properties. So now they can use with KVO.

What's Changed

Full Changelog: 0.16.1...0.17.0

0.16.1

14 Mar 15:54
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.16.0...0.16.1

0.16.0

07 Mar 13:49
Compare
Choose a tag to compare

What's Changed

  • Simple CBMPeripheral implementation for Swift UI Previews by @philips77 in #88
  • Add option CBMConnectPeripheralOptionEnableTransportBridgingKey by @larsamannen in #89
  • Bug fix: Don't read LED state after write if not supported by @philips77 in #90
  • Documentation updated by @philips77 in #91

New Contributors

Full Changelog: 0.15.0...0.16.0

0.15.0

02 Mar 14:35
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.14.0...0.15.0

0.14.0

10 May 11:00
Compare
Choose a tag to compare

What's Changed

  • Allow initializing a CBMServiceMock with arrays of services and characteristics by @jaylyerly in #65
  • Make sure to get the latest object from CB on retrievePeripherals by @jason-gabriele in #67

New Contributors

Full Changelog: 0.13.0...0.14.0

0.13.0

23 Aug 15:37
Compare
Choose a tag to compare

Version 0.13.0

The new version allows mocking more features present in the native API: authorization and support for duplicate services.
Some changes broke the existing API so migration is necessary. Migration guide available below.

New features:

  • Support for authorization added (#54 which fixed #46).
  • Support for duplicate services (#62 which fixed #42).
  • Allowing extending CBMCentralManager (#56 which fixed #55). #54 changed the type from a protocol to a class so additional work was necessary to make it extendable.
  • Support for retrieving peripherals (#57 with #45).
  • Option to change mock device MAC address (also #57) making it not-retrievable.
  • Option to simulate caching device (again #57) to make a device retrievable without scanning.

Changes related to Xcode 13 beta:

  • Fixed build for Xcode 13 (#50, #51, #52) - Xcode 13 and Swift 5.5 changed type of peripheral and service properties in CBService and CBCharacteristic from unowned to weak making the properties optional. The change, just like in native Swift, applies only in Swift 5.5+.

Bugs fixed:

  • Unit test failing with EXC_BAD_ACCESS (#39 fixed with #60)
  • Fix incorrect range issue when writing data with size less than mtu - 3 (#43 fixed with #53)
  • Calling simulateValueUpdate for characteristic repeatedly can result in dropped and duplicate values updates (#59 fixed with #58)
  • Peripheral disconnect and teardown cause assertion failure (#25 perhaps fixed with #61)

Breaking changes

  1. CBMCentralManager was refactored from a protocol to a class. Extending the base class is still possible, as it was made open. This change allows using CBMCentralManager.authorization (#54) on the base class without the need to specify mock or native manager. See #56 and #55 for more information.
  2. Number of callback methods in CBMPeripheralSpecDelegate were refactored to receive the original mock attribute (CBMServiceMock, CBMCharacteristicMock and CBMDescriptorMock instead of per-client copies of the above. This makes the API more logical, and also allows having duplicated service, characteristics and descriptors (having another instance with the same UUID). The old methods are deprecated and are still called with the new parameters, but modifying the parameter type is recommended, as this may change in the future (it generates warnings).
  3. Both simulate... properties were moved from CBMCentralManagerFactory to CBMCentralManagerMock, where other such methods already were present. This brings similar methods to one place.

Migration guide from 0.12.1 to 0.13.0

  • Change the types of parameters in your CBMPeripheralSpecDelegate from CBMService, CBMCharacteristic and CBMDescriptor to CBMServiceMock, CBMCharacteristicMock and CBMDescriptorMock respectively.
  • If CBMCentralManagerFactory.simulateStateRestoration or CBMCentralManagerFactory.simulateFeaturesSupport properties were used, change CBMCentralManagerFactory type to CBMCentralManagerMock. The API and behavior are the same.
  • If you for some reason provided your own implementation of CBMCentralManager modify your code as the CBMCentralManager became a open class instead do a protocol.

0.12.1

30 Apr 13:08
360ba1f
Compare
Choose a tag to compare

This version fixes issues with Xcode 12.5:

  • Fixes for Xcode 12.5 beta (#31, #33, #34),
  • Compilation errors and warnings fixed (#35).

Known issue:

  • The nRF Blinky app (sample app) crashes on iOS 11.0.2 just after splash screen. Without any reason. This requires investigation.

0.12.0

02 Oct 13:24
af28b32
Compare
Choose a tag to compare

This version fixes #27 and migrated project to Xcode 12 (#28).

0.11.1

07 Aug 11:24
1562143
Compare
Choose a tag to compare

Bugs fixed:

  • Fixed handling mock devices out of range (#23)
  • Reseting peripheral state after failed connection (#22)

Improvements:

  • Error handling has been improved in nRF Blinky sample app
  • Unit test added