Releases: NordicSemiconductor/IOS-CoreBluetooth-Mock
Releases · NordicSemiconductor/IOS-CoreBluetooth-Mock
0.18.0
What's Changed
- Bug fix: Update README.md - fixes typo in Core Bluetooth mock section by @adamrhunter in #105
- Bug fix: Wrap
CBPeripherals
asCBMPeripheralNative
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
- @adamrhunter made their first contribution in #105
- @kennylovrin made their first contribution in #106
- @everlof made their first contribution in #102
Full Changelog: 0.17.0...0.18.0
0.17.0
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
- KVO Support by @NickKibish in #96
- Update CoreBluetoothMock.podspec by @NickKibish in #99
- Documentation updated by @philips77 in #100
Full Changelog: 0.16.1...0.17.0
0.16.1
What's Changed
- Documentation improvements by @philips77 in #93
- Bug fix: Fixed connection to already connected devices by @philips77 in #94
Full Changelog: 0.16.0...0.16.1
0.16.0
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
- @larsamannen made their first contribution in #89
Full Changelog: 0.15.0...0.16.0
0.15.0
What's Changed
- Fix typos in codebase by @AdrianBinDC in #77
- fix advertising timer by @kscheff in #76
- Bug fix: Retrieving peripherals multiple times by @philips77 in #79
- Bug fix: Returning peripheral name fixed by @philips77 in #80
- Bug fix: Accept empty list in service discovery by @kscheff in #70
- reflect notification status
.isNotifying
back ... by @kscheff in #74 - Fixed UA localization by @NickKibish in #82
- Multiple advertisements per peripheral + option to change by @philips77 in #81
- Bug fix: Fixed selected service discovery by @philips77 in #83
- Bug fix: scanning with filter fixed by @philips77 in #84
- Tests for multiple advertising by @philips77 in #85
- Version set to 0.15.0 by @philips77 in #86
- Documentation by @philips77 in #87
New Contributors
- @AdrianBinDC made their first contribution in #77
- @kscheff made their first contribution in #76
- @NickKibish made their first contribution in #82
Full Changelog: 0.14.0...0.15.0
0.14.0
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
- @jaylyerly made their first contribution in #65
- @jason-gabriele made their first contribution in #67
Full Changelog: 0.13.0...0.14.0
0.13.0
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
andservice
properties inCBService
andCBCharacteristic
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
CBMCentralManager
was refactored from a protocol to a class. Extending the base class is still possible, as it was made open. This change allows usingCBMCentralManager.authorization
(#54) on the base class without the need to specify mock or native manager. See #56 and #55 for more information.- Number of callback methods in
CBMPeripheralSpecDelegate
were refactored to receive the original mock attribute (CBMServiceMock
,CBMCharacteristicMock
andCBMDescriptorMock
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). - Both
simulate...
properties were moved fromCBMCentralManagerFactory
toCBMCentralManagerMock
, 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
fromCBMService
,CBMCharacteristic
andCBMDescriptor
toCBMServiceMock
,CBMCharacteristicMock
andCBMDescriptorMock
respectively. - If
CBMCentralManagerFactory.simulateStateRestoration
orCBMCentralManagerFactory.simulateFeaturesSupport
properties were used, changeCBMCentralManagerFactory
type toCBMCentralManagerMock
. The API and behavior are the same. - If you for some reason provided your own implementation of
CBMCentralManager
modify your code as theCBMCentralManager
became a open class instead do a protocol.