这是场景,我在我的应用程序中添加了今天的扩展目标。在我的小部件 ViewController 中,它通过核心位置框架监听位置变化。此外,在我的包含应用程序中有位置变化监听器。我知道有一个回调来获取最新位置。
optional func locationManager(_ manager: CLLocationManager!,
didUpdateLocations locations: [AnyObject]!)
但是,我想知道的是,当我的包含应用程序和小部件都在运行时(听起来很奇怪,假设包含应用程序在后台运行),并且它们都在使用 CLLocationManager 监听位置更改,是否调用了 locationManager:didUpdateLocations: 方法同时获得相同的位置数据或其他东西?(我知道小部件和应用程序提前在单独的进程中运行)提前谢谢。:-]