检查是否已启用蓝牙? [英] Check if Bluetooth is Enabled?

查看:264
本文介绍了检查是否已启用蓝牙?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想做蓝牙是否在设备上启用或不是一个简单的检查。

I just want to do a simple check of whether bluetooth is enabled on the device or not.

我不希望从更改应用内的状态(或全部),使用私有的API,越狱的设备,或做任何事情会导致苹果拒绝的应用程序。

I don't want to change the status from inside an app (or at all), use private API's, jailbreak a device, or do anything that would cause Apple to reject an app.

我要的是要知道蓝牙是否开启或没有。

All I want is to know whether bluetooth is turned on or not.

任何人都可以揭示出这个任何光线?是否有任何苹果允许的方式做到这一点?

Can anyone shed any light on this? Is there any Apple-allowed way to do this?

我完全知道,阅人无数的帖子和文档,苹果是非常严格的,当涉及到蓝牙(除其他事项外)后。

I am fully aware, after reading countless posts and documentation that Apple is very restrictive when it comes to Bluetooth (among other things).

如果您只能用一个链接到文档和/或对学习的Objective-C,阅读文档等,那么请不要回应一些卑鄙的话有助于这个问题。

If you are only able to contribute to this question with a link to documentation and/or some snide remark about learning objective-c, reading documentation, etc., then please don't respond.

推荐答案

我曾经发现,要做到这一点的唯一方法是与那些只可用于越狱应用的私密框架(如蓝牙管理器,一)...而苹果将使用专用的框架拒绝任何应用程序。我相信这是甚至对他们的服务条款做任何蓝牙,让你的运气那里。

The only way I've ever found to do this is with private frameworks (like Bluetooth Manager, for one) that are only useful for Jailbroken apps... and Apple will reject any app using a private framework. I believe it's even against their ToS to do anything with bluetooth, so you're out of luck there.

这篇关于检查是否已启用蓝牙?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆