ios - swift :信标测距在打电话时返回空数组

标签 ios swift location bluetooth-lowenergy ibeacon

我们有一个使用 CLLocationManager 进行信标测距的应用程序 - Swift 4 下的核心位置。测距功能通常工作正常,返回范围内的任何信标。但是,如果蓝牙耳机连接到手机,并且接听或调用电话,仍然会调用信标测距函数,但会返回一个空数组。我们的应用程序在前台时会发生这种情况。

尝试了 Apple 商店的信标扫描仪 (Beacon Scan) 应用程序。它还会在通话时停止检测信标。

我们期待信标测距在蓝牙耳机通话时继续返回检测到的信标。关于为什么没有的任何想法?退出区域事件也会被触发。当电话结束时,信标测距再次开始工作。这在 Android 上不是问题。

最佳答案

这是 Apple 的回应。显然,在使用蓝牙耳机通话时无法进行信标检测。

感谢您联系 Apple 开发人员技术支持 (DTS)。我们已审核您的请求,并得出结论,鉴于当前的系统配置,没有支持的方法来实现所需的功能。

如果您希望 Apple 考虑在未来增加对此类功能的支持,请通过反馈助手 (https://feedbackassistant.apple.com) 提交增强请求。有关反馈助手的更多信息,请访问https://developer.apple.com/bug-reporting/ .

虽然技术支持事件 (TSI) 最初​​是从您的 Apple Developer Program 帐户中为此请求扣除的,但我们已将替换事件分配回您的帐户。

最好的问候,

开发人员技术支持 全局开发者关系 苹果公司

PLATFORM AND VERSION iOS We've tested with iPhones 6s (OS 12.3.1), 6s Plus (12.4), and 10r (12.4) using AirPods, Jabra and Plantronics headsets so far. All have this issue.

DESCRIPTION OF PROBLEM We have an app that does beacon ranging using CLLocationManager - Core Location under Swift 4. The ranging functions works fine, returning any beacons in range. However, if a Bluetooth headset is connected to the phone, and a phone call is either received or made, the beacon ranging function is still called, but returns an empty array. This happens with our app in the foreground.

Tried a beacon scanner (Beacon Scan) app from Apple store. It also stops detecting beacons when on a phone call.

We're expecting beacon ranging to continue returning detected beacons while on a Bluetooth headset phone call. Any ideas as to why it doesn't? The exit region event also gets triggered. When the phone call ends, the beacon ranging starts working again.

STEPS TO REPRODUCE Implement a beacon detection solution using Core Location. Or, install a beacon scanner app. Connect phone to a Bluetooth headset. While ranging beacons with a beacon on, make or receive a phone call via the Bluetooth headset. Beacon detection fails while on the call. As soon as the call is over, beacon ranging once again returns the filled array.

关于ios - swift :信标测距在打电话时返回空数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57297715/

相关文章:

ios - 在ios中设置一个定时器

ios - 图片未从 Firebase 存储中下载

swift - 自定义 URL 方案不适用于 Swift 5、Xcode 11

ios - iOS 13 中的 "Allow always"位置问题

java - Android - LocationManager 小数点后的数字

ios - UILabel在缩小时会自动设置行数和字体大小

ios - UIPopover contentSize 在运行时发生变化

ios - Swift.Extensions var 和 func。哪一个更好?

ios - SWIFT:很难在 tableView 中显示数据

c++ - 在哪里存储 .properties 文件以在 C++ dll 中使用