Possible to use geofencing (region monitoring) on iOS without “Always” location access?

一笑奈何 提交于 2019-12-11 15:22:58

问题


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....


回答1:


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



来源:https://stackoverflow.com/questions/45764047/possible-to-use-geofencing-region-monitoring-on-ios-without-always-location

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