Will an iOS app that monitors signficant location changes be restarted on device reboot?

徘徊边缘 提交于 2019-12-07 06:10:45

问题


From the Core Location documentation:

The regions you register with the location manager persist between launches of your application. If a region crossing occurs while your application is not running, the system automatically wakes up your application (or relaunches it) in the background so that it can process the event. When relaunched, all of the regions you configured previously are made available in the monitoredRegions property of any location manager objects you create.

Unfortunately, this is unclear as to whether or not the same app will also be relaunched after device reboot in response to a region change.

Will an iOS app that monitors significant location changes in the background still be relaunched, even after a device reboot?


回答1:


Yes, your app will be launched to respond to the region events even if the phone is restarted, and even if the user did not explicitly run your app after the reboot.

I haven't seen any documentation that spells that out clearly. But this is how it works in a couple of my own apps.




回答2:


Just to make an update. I know that this is an old question, but I want to confirm that it works on iOS7, even after a reboot.

Check my question here: Are background mode location and fetch called even after the device restarted in iOS7?



来源:https://stackoverflow.com/questions/8817111/will-an-ios-app-that-monitors-signficant-location-changes-be-restarted-on-device

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