I am trying to find connected Bluetooth devices using CBCentralManager's retrieveConnectedPeripherals(withServices: [CBUUID]) method. I have been able to find connected devices by including ScanUUID in the [CBUUID] array. However, in the iOS 18 Beta Version, I am unable to find any devices using this method.
I discovered that the solution is to include ServiceUUID in the array instead of ScanUUID.
Can you please clarify if this is a change in specifications in iOS 18 Version or if it is a bug?
It is neither. I don't know what you mean by ScanUUID but the API call is retrieveConnectedPeripherals(withServices: [CBUUID]) and you are and have always were supposed to use a service UUID in the array.
This has always been the case, and it is still the case in iOS 18. Your code may have been unexpectedly working for some unknown reason, perhaps because whatever the ScanUUID was, happened to match the service UUID of the peripheral.
Argun Tekant / DTS Engineer / Core Technologies