开发者

What is the difference between significant location and region change updates?

开发者 https://www.devze.com 2023-04-12 04:54 出处:网络
It\'s impossible to set desiredAccuracy for significant location change. I have tried and it re开发者_StackOverflow社区turned default value 1414 for horizontalAccuracy. Does region change update metho

It's impossible to set desiredAccuracy for significant location change. I have tried and it re开发者_StackOverflow社区turned default value 1414 for horizontalAccuracy. Does region change update method is better in terms of accuracy? Is it possible to set it and what is the maximum allowed accuracy for region change update?


There is no accuracy for -monitorForSignificantLocationChange. It is a built in monitor that is designed to be used for broad updates, low on accuracy (but can be accurate enough depending on the application), and great on battery life. It works on the same principal as the -monitorForRegion method. It will update when it thinks you have moved a significant bit (e.g. cell tower transition, new wifi connection, etc). It will also steal/borrow location from other apps that use location as well. So it can be pretty accurate considering how it gets your location.

If you need precise location in the background... you are going to have to sacrifice battery life. The only other alternative is to sacrifice some location accuracy. In my experience, the location returned via the significant change and region monitoring is pretty accurate.

Region monitoring can take accuracy settings. But it mainly just comes off your -locationManager settings. Once you enter the background, you are at the mercy of the system again. I'm not 100% sure if your -monitorForRegion will retain the set level of accuracy, my guess is no. Mainly due to the restrictions on battery life. Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号