NordicSemiconductor / IOS-CoreBluetooth-Mock

Mocking library for CoreBluetooth framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library does not compile with Xcode 13 beta/iOS 15 SDK due to CoreBluetooth API changes

zwift-aebling opened this issue · comments

A number of inverse relationships in CoreBluetooth (e.g. CBCharacteristic.service) have been changed from unowned(unsafe) to weak, and therefore Optional in the iOS 15 SDK.

This results in numerous compilation errors when attempting use the IOS-CoreBluetooth-Mock library:

~/IOS-CoreBluetooth-Mock/CoreBluetoothMock/Classes/CBMCentralManagerNative.swift:391:51: Value of optional type 'CBService?' must be unwrapped to a value of type 'CBService'

I love Apple and it's approach to backwards compatibility. Thank you for letting us know! Could you, please, prepare a PR with a fix?

Will do!

Did it:
#44

This should now work on develop branch after #50, #51 and #52.