目标 c 检查蓝牙可用性是否改变 [英] objective c check if Bluetooth Availability Changed
本文介绍了目标 c 检查蓝牙可用性是否改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问题很简单:当用户在 iOS 设备上启用或禁用蓝牙时,有什么方法可以引起注意吗?
The question is simple: Is there any way to get noticed when the users enables or disables bluetooth on a iOS device?
我搜索了互联网,但只找到了一些私有 API.
I searched the internet but just found some private API´s.
感谢您的帮助.
推荐答案
您可以使用低功耗蓝牙 (BTLE) 接口.每当用户在设置中禁用/启用蓝牙时,您都会收到更新.检查 CBCentralManagerDelegate 协议参考.当然你也可以查看 状态
You can use Bluetooth Low Energy's (BTLE) interface. You will get updates whenever an user disables/enables Bluetooth in settings. Check the CBCentralManagerDelegate Protocol Reference. And of course you can also check the state
这篇关于目标 c 检查蓝牙可用性是否改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文