最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

xcode - iOS BLE Peripheral Still Visible in Scanner When App is Backgrounded Without bluetooth-peripheral - Stack Overflow

programmeradmin1浏览0评论

I'm developing a BLE peripheral app using CoreBluetooth on iOS. My expectation is that when I do not include bluetooth-peripheral in Info.plist, my peripheral should stop advertising when the app moves to the background. However, despite removing bluetooth-peripheral, my peripheral still appears in a BLE scanner app (i.e. nRF Connect) even after backgrounding.

What I’ve Tried: Confirmed bluetooth-peripheral is NOT in Info.plist.
Restarted Bluetooth on the scanning device, but the peripheral still shows up.
Ensured that my peripheral is only advertising when CBPeripheralManager.state == .poweredOn.
Disconnected peripheral app from Xcode as Xcode provides unlimited background resources

Expected Behavior: When my app is in the foreground, my BLE peripheral should be visible in scanners. When my app moves to the background, my BLE peripheral should disappear from the scanner.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论