禁用蓝牙时的 iOS 信标区域监控

标签 ios ibeacon region-monitoring

我知道 iOS 允许基于 iBeacon 的后台区域监控,但我找不到指示用户是否必须启用蓝牙的文档?

如果从控制中心禁用蓝牙,它还能工作吗? 如果用户禁用了蓝牙,我觉得这几乎没用。

最佳答案

是的,需要启用蓝牙。您如何回应它被禁用是特定于应用程序的。

此链接(位置和 map 编程指南):https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html

就场景以及您可能如何处理它们提供了一些指导。

In iOS 7.0 and later, always call the isMonitoringAvailableForClass: and authorizationStatus class methods of CLLocationManager before attempting to monitor regions. (In OS X v10.8 and later and in previous versions of iOS, use the regionMonitoringAvailable class instead.) The isMonitoringAvailableForClass: method tells you whether the underlying hardware supports region monitoring for the specified class at all. If that method returns NO, your app can’t use region monitoring on the device. If it returns YES, call the authorizationStatus method to determine whether the app is currently authorized to use location services. If the authorization status is kCLAuthorizationStatusAuthorized, your app can receive boundary crossing notifications for any regions it registered. If the authorization status is set to any other value, the app doesn’t receive those notifications.

关于禁用蓝牙时的 iOS 信标区域监控,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29351920/

相关文章:

xcode - 根据最近的信标播放来自 url 的视频

ios - 应用程序 didFinishLaunchingWithOption : detecting if app was launched after entering iBeacon region

iOS 后台唤醒受密码保护的设备

cllocationmanager - iOS 14 - 当精确位置权限被拒绝时,如何让 iBeacon 唤醒应用程序?

ios - 在Xcode 7.3中使用Cocoapods

ios - UIScrollView 中的 UICollectionView -> 滚动顺序

ios - iBeacon在后台的检测时间(家庭自动化用例)

ios - 在后台模式下定期向服务器发送小数据

ios - 异常 'Invalid type in JSON write (__SwiftValue)' 而 JSON 使用数组编码 Swift 对象

ios - 将 iBeacons 集成到 CoreLocation 室内项目中