Is it possible to programmatically access the error codes logged by CoreBluetooth?

匆匆过客 提交于 2019-12-04 07:16:47
allprog

In an application you can only use the CoreBluetooth APIs. Those expose only CBError which, as you see it right in many cases can mask the real error. So the answer for officially accessing the source errors is that you can't do it.

However, if you want, you can access the Apple System Logs programmatically. (See post: Using Objective C to read log messages posted to the device console) You can define a query to return the items you are interested in and try to deduct the real reason of the error. This is a heuristic method but at the moment, unfortunately, we have no other way to do it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!