Problem with deleting SDP service (macOS, IOBluetooth)
macOS, IOBluetooth framework.
My goal is to create a temporary SDP service. According to the documentation, by default a temporary service is created (aka Persistent = NO), which is deleted after the application is closed. The documentation also mentions the IOBluetoothRemoveServiceWithRecordHandle function for forced removal of the service. This function is deprecated and is currently unavailable. I guesse that it has been replaced by the IOBluetoothSDPServiceRecord.removeServiceRecord method.
The essence of the problem is that the server is not deleted either using removeServiceRecord or even after app closing. That is, if you create several services and try to delete them, they will remain alive. Only turning Bluetooth off and on in the OS helps. I tested all versions of macOS starting with Monteray. The same behavior.