简体   繁体   English

睡眠时iOS位置发生重大变化

[英]iOS Significant Location Change while Asleep

如果手机处于睡眠状态(例如,在用户口袋中),iOS位置管理器的SignificantLocationChange是否会唤醒应用程序?

From Location awareness programming guide: 位置感知编程指南中:

If you leave this service running and your application is subsequently suspended or terminated, the service automatically wakes up your application when new location data arrives. 如果您使该服务保持运行状态,并且您的应用程序随后被挂起或终止,那么当新的位置数据到达时,该服务会自动唤醒您的应用程序。 At wake-up time, your application is put into the background and given a small amount of time to process the location data. 唤醒时,您的应用程序将被置于后台,并留出少量时间来处理位置数据。 Because your application is in the background, it should do minimal work and avoid any tasks (such as querying the network) that might prevent it from returning before the allocated time expires. 因为您的应用程序在后台,所以它应该做的工作很少,并且避免任何可能阻止其在分配的时间到期之前返回的任务(例如查询网络)。 If it does not, your application may be terminated. 否则,您的应用程序可能会终止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM