iphone - 当 iPhone 应用程序后台不工作时是否可以获取位置

标签 iphone ios

Foursquare iPhone 应用程序获取我的位置并向我发送通知,即使它不在后台工作。这怎么可能?

最佳答案

查看该方法的文档startMonitoringSignificantLocationChanges类(class)CLLocationManager .它说:

If you start this service and your application is subsequently terminated, the system automatically relaunches the application into the background if a new event arrives.

这意味着应用程序即使被终止也会收到通知。

关于iphone - 当 iPhone 应用程序后台不工作时是否可以获取位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9892405/

相关文章:

iphone - 尝试在数字键盘上实现完成/取消按钮,但在模拟器中选择文本字段时会出现错误

iphone - 了解GCD block 中[NSData dataWithContentsOfURL:URL]的行为

ios - 如何在 iPad 硬件(而不是模拟器)中测试 iPad 应用程序

iphone - 如何从我的临时配置文件中删除待生成过期状态证书

IOS Flutter 运行 - 未连接设备

ios - 使用 UserDefaults 填充值时 TableView reloadData() 不起作用

ios - 如何在不快速继承 NSObject 的情况下覆盖 NSObject 方法

ios - 如何获取嵌套在 UIView 中的 UIView 框架 - Objective C

ios - Swift UIAlertController,文本中带有 url

ios - CFRelease中的空指针(由静态分析器告知)