What is the maximum and minimum radius that can be set for regions in iOS geofencing

坚强是说给别人听的谎言 提交于 2019-12-04 00:22:24

In iOS there is no minimum radius specified. Apple says, "The specific threshold distances are determined by the hardware and the location technologies that are currently available. For example, if Wi-Fi is disabled, region monitoring is significantly less accurate. However, for testing purposes, you can assume that the minimum distance is approximately 200 meters."

(source: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html#//apple_ref/doc/uid/TP40009497-CH9-SW11)

The maximum radius is specified by CLLocationManager.maximumRegionMonitoringDistance, which is specific to the device and OS. "This value may vary based on the hardware features of the device, as well as on dynamically changing resource constraints." On my iPhone 5s simulator, that value is 2128000.0 (metres, since maximumRegionMonitoringDistance is a CLLocationDistance).

(source: https://developer.apple.com/library/IOS/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/instp/CLLocationManager/maximumRegionMonitoringDistance and CLLocationManager.h)

In urban canyons where there are a lot of buildings (such as New York City) geofencing may not be useful regardless of distance, and you might need to rely on iBeacons.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!