iOS蓝牙后台模式

标签 ios bluetooth bluetooth-lowenergy

我希望继续扫描蓝牙设备,并且我希望应用程序在后台运行。可能吗?似乎如果我有一个连接的蓝牙设备,并且如果有数据传输,那么该应用程序会在后台保持唤醒状态。但是,如果我只是在后台扫描,即使我选中了 Uses Bluetooth LE accessories(plist 中的 bluetooth-central),应用程序最终也不会运行。

有没有办法让应用在后台运行并持续扫描设备?

最佳答案

根据苹果开发者文档技术问答。

Can I use an iOS device to issue iBeacon advertisements while my app is in the background? Answer: No. For an iOS device to issue iBeacon advertisements, the app requesting this functionality must be frontmost, with the screen turned on and the device unlocked.

引用 - https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf

我找到了这篇文章,其中提供了一些在某些特定情况下在后台连接 BLE 的详细信息。 https://medium.com/@cbartel/ios-scan-and-connect-to-a-ble-peripheral-in-the-background-731f960d520d

关于iOS蓝牙后台模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34117336/

相关文章:

ios - 蓝牙信号弱 iOS

ios - iOS 上的自定义 BLE 广告

ios - 快速判断可选值不起作用

iphone - 在我的 iPhone 应用程序项目中出现内存泄漏我应该如何解决它?

android - 如何更改 Android 中的蓝牙存储位置?

c# - BluetoothGATTGetCharacteristics 在 BluetoothApis.dll 中抛出访问冲突读取位置 0xFFFFFFF7

Android Ble MTU 大小

ios - 我有一个应用内购买设置,它有效,除了当用户按下 "cancel"它仍然最终购买产品

ios - 重启录音时 AVAudioEngine inputNode installTap 崩溃

java - 关于android蓝牙要求的问题