可以在iOS上使用地理围栏(区域监视),而无需“始终”位置访问? [英] Possible to use geofencing (region monitoring) on iOS without "Always" location access?

查看:412
本文介绍了可以在iOS上使用地理围栏(区域监视),而无需“始终”位置访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一些测试代码,当我离开一个区域或输入一个区域时,它会在后台提醒我。可与始终位置访问配合使用。 —但是,如果我将应用程序的位置访问权限更改为使用中,则此功能将不再起作用。恢复后可以再次使用。



我(和其他人一样)对iOS上的地理围栏(区域监视)应该没有也可以正常工作位置访问。



空心箭头甚至在没有始终的情况下也不会出现在状态栏中,这是一种权利或设置。提示:如果未始终打开始终,则不支持该提示,但是。。

解决方案

这是预期的。区域监视,访问监视,重要的位置更改均在OS级别处理,并且需要始终访问才能进行工作。这是来自


I wrote some test code that alerts me in the background when I've left a region or entered it. Works great with "Always" location access. — However, if I change the app's location access to "When In Use", it doesn't work anymore. Works again when reverted.

I was under the impression (as were others) that geofencing (region monitoring) on iOS should work without "Always" location access. Is there an entitlement or setting somewhere to enable it to work correctly?

The hollow arrow doesn't even appear in the status bar without "Always", which is kind of a tip-off that it's not supported without "Always" being turned on, but yeah....

解决方案

That's expected. Region monitoring, visit monitoring, significant Location Changes are handled on the OS level and to work need Always access. This is a screen shot from WWDC Core Location Best Practice Minute 14:09

这篇关于可以在iOS上使用地理围栏(区域监视),而无需“始终”位置访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆