如何在使用GPS时减少iPhone电池消耗

如何在使用GPS时减少iPhone电池消耗

问题描述:

我使用GPS实际监控是否进入了某个区域(半径100米)。

I am using GPS to actually monitor if I have entered a regions (radius 100 m).

我使用的是 significantLocationChange 和硬件GPS的混合体, startUpdatingLocation

I am using a hybrid of significantLocationChanges and hardware GPS, startUpdatingLocation.

由于 significantLocationChanges 不如我要求的准确,因此我只使用它们来检查我是否输入了外部圆的X m。然后我使用硬件GPS检查用户是否进入内圈(100米)。

As significantLocationChanges are not as accurate as I require I am using them only to check if I have entered a outer circle of X m. Then I use hardware GPS to check if the user enters an inner circle (100m).

它的问题是,电池很快耗尽,任何人都可以帮助我。

The problem with it is that battery is getting drained pretty quickly, can anyone help me out.

以下是高性能iOS应用程序的预览:

Here's a preview of a nice read (High Performance iOS Apps):

https://www.safaribooksonline.com /library/view/high-performance-ios/9781491910993/ch04.html

您会看到它通常涵盖电池使用情况,因此搜索 gps。我用这个作为参考,所以我不会忘记它的任何提示。请阅读:)

You'll see it covers battery usage in general, so search for "gps" for specifics. I use this as a reference so I don't forget any of it's tips. Enjoy the read :)