You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently on my MacBookPro Early 2015 running macOS 12.4 the IOBluetooth API is behaving weird. First users noticed in #20 that the Type Method recentDevices() is returning an empty array. After switching to pairedDevices() in version 1.0.2 I'm getting the devices as a list again…
Unfortunately the method recentDevices() no always returns the current DateTime. The official Apple documentation and some googling around didn't help me at all to resolve the issues.
As a part time developer for the macOS platform this whole situation is quite frustrating to me… Although I created a small Swift script that demonstrates the behavior:
import IOBluetooth
varpairedDevices=IOBluetoothDevice.pairedDevices()as![IOBluetoothDevice]varrecentDevices=IOBluetoothDevice.recentDevices(0)as![IOBluetoothDevice]print("Paired Devices: ", pairedDevices.count)fordevicein pairedDevices {print(device.nameOrAddress!, device.recentAccessDate()!)}
// prints all paired devices, but recentAccessDate is always now!
print("Recent Devices: ", recentDevices.count)fordevicein recentDevices {print(device.nameOrAddress!, device.recentAccessDate()!)}
// prints nothing – recentDevices is empty
The text was updated successfully, but these errors were encountered:
Currently on my MacBookPro Early 2015 running macOS 12.4 the IOBluetooth API is behaving weird. First users noticed in #20 that the Type Method
recentDevices()
is returning an empty array. After switching topairedDevices()
in version 1.0.2 I'm getting the devices as a list again…Unfortunately the method
recentDevices()
no always returns the current DateTime. The official Apple documentation and some googling around didn't help me at all to resolve the issues.As a part time developer for the macOS platform this whole situation is quite frustrating to me… Although I created a small Swift script that demonstrates the behavior:
The text was updated successfully, but these errors were encountered: