How can I clear the CoreBluetooth cache on MacOS?

前端 未结 1 1179
南旧
南旧 2020-12-25 15:24

I\'m developing a Bluetooth LE device and am having trouble because of MacOS\'s caching of the services. If I try to delete a service or change its UUID on the device I\'m

相关标签:
1条回答
  • 2020-12-25 16:02

    I finally found the source of the problem -- there's a cache in the user preferences folder in a folder named ByHost. Here are the steps to clear the Bluetooth cache:

    • Turn off Bluetooth
    • Delete com.apple.Bluetooth.plist from /Library/Preferences
    • Delete files named com.apple.Bluetooth.somehexuuidstuff.plist from ~/Library/Preferences/ByHost (note that this is the user preference folder, not the system one)
    • Turn on Bluetooth

    After doing that my peripheral's services are correctly identified. From what I found on the web, there may also be some other com.apple.Bluetooth files in /Library/Preferences related to HIDs or headsets or something -- I don't know if it's important to delete those as I didn't have them on my system.

    0 讨论(0)
提交回复
热议问题