IOS CLocationUpdates in 10.3.1 dropouts

时间:2017-04-11 08:27:18

标签: ios core-location

自从我将测试设备更新到10.3.1后,我发现CoreLocation更新的异常不可靠行为。后台更新工作正常,但现在我确实看到几分钟没有位置更新。

示例:(注意7:52和7:55之间的差距)

"DidUpdateLocation(456):" 1 item(s), [0]:<+50.32941864,+7.32525473> +/- 10.00m (speed 12.89 mps / course 268.59) @ 11.04.17, 07:52:33 Mitteleuropäische Sommerzeit
"DidUpdateLocation(457):" 1 item(s), [0]:<+50.32945728,+7.32498240> +/- 10.00m (speed 15.14 mps / course 274.22) @ 11.04.17, 07:52:34 Mitteleuropäische Sommerzeit
"DidUpdateLocation(458):" 1 item(s), [0]:<+50.32949496,+7.32475064> +/- 10.00m (speed 15.72 mps / course 276.33) @ 11.04.17, 07:52:35 Mitteleuropäische Sommerzeit
"DidUpdateLocation(459):" 1 item(s), [0]:<+50.32913876,+7.31447465> +/- 20.00m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:54:01 Mitteleuropäische Sommerzeit
"DidUpdateLocation(460):" 1 item(s), [0]:<+50.33095244,+7.31326157> +/- 3848.52m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:55:14 Mitteleuropäische Sommerzeit
"DidUpdateLocation(461):" 1 item(s), [0]:<+50.33135000,+7.31427845> +/- 3848.52m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:55:14 Mitteleuropäische Sommerzeit
"DidUpdateLocation(462):" 1 item(s), [0]:<+50.33164169,+7.31502036> +/- 3848.53m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:55:14 Mitteleuropäische Sommerzeit
"DidUpdateLocation(463):" 1 item(s), [0]:<+50.33185754,+7.31555743> +/- 3848.75m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:55:15 Mitteleuropäische Sommerzeit
"DidUpdateLocation(464):" 1 item(s), [0]:<+50.33201442,+7.31595280> +/- 3848.87m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:55:16 Mitteleuropäische Sommerzeit
"DidUpdateLocation(465):" 1 item(s), [0]:<+50.33251218,+7.30468715> +/- 165.00m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:55:17 Mitteleuropäische Sommerzeit
"DidUpdateLocation(466):" 1 item(s), [0]:<+50.33251444,+7.30467202> +/- 165.00m (speed -1.00 mps / course -1.00) @ 11.04.17, 07:55:18 Mitteleuropäische Sommerzeit
"DidUpdateLocation(467):" 1 item(s), [0]:<+50.33281479,+7.30472224> +/- 200.00m (speed 10.76 mps / course 355.43) @ 11.04.17, 07:55:19 Mitteleuropäische Sommerzeit
"DidUpdateLocation(468):" 1 item(s), [0]:<+50.33300525,+7.30473463> +/- 200.00m (speed 10.76 mps / course 355.43) @ 11.04.17, 07:55:20 Mitteleuropäische Sommerzeit
"DidUpdateLocation(469):" 1 item(s), [0]:<+50.33316824,+7.30473717> +/- 30.00m (speed 14.44 mps / course 349.80) @ 11.04.17, 07:55:21 Mitteleuropäische Sommerzeit
"DidUpdateLocation(470):" 1 item(s), [0]:<+50.33309477,+7.30483197> +/- 50.00m (speed 16.59 mps / course 352.62) @ 11.04.17, 07:55:22 Mitteleuropäische Sommerzeit
"DidUpdateLocation(471):" 1 item(s), [0]:<+50.33345976,+7.30459652> +/- 10.00m (speed 14.98 mps / course 349.45) @ 11.04.17, 07:55:23 Mitteleuropäische Sommerzeit
"DidUpdateLocation(472):" 1 item(s), [0]:<+50.33364132,+7.30456316> +/- 10.00m (speed 14.47 mps / course 350.86) @ 11.04.17, 07:55:24 Mitteleuropäische Sommerzeit

看起来CL从使用GPS硬件切换到手机信号塔(精度跳到“+/- 3848.52m”,速度到“-1”)并返回。该应用程序在后台运行,但有足够的剩余后台时间( UIApplication.shared.backgroundTimeRemaining )。

BTW:这个剩余的背景时间(172秒)间隙没有变化。在差距之前和之后,每秒都有通常的减量。

我的位置更新设置如下:

"initializeLocationTracking()"): .pausesLocationUpdatesAutomatically == false
"initializeLocationTracking()"): .allowsBackgroundLocationUpdates    == true
"initializeLocationTracking()"): .distanceFilter  == -1.0
"initializeLocationTracking()"): .activityType    == .fitness
"initializeLocationTracking()"): .desiredAccuracy == 10.0

是否有其他人看到相同的行为?有人有一个很好的解释吗?

先谢谢

哈迪

0 个答案:

没有答案