开发者

iPhone: stopMonitoringSignificantLocationChanges when app quits

I want to stopMonitoringSignificantLocationChanges when the user is killing the app from the multitask bar (switch bar) like the Waze GPS App does.

(i also want to cancel all LocalNotifications)

the problem is, that after an applic开发者_开发问答ation get's suspended, applicationWillTerminate doesn't get called.


The way Waze does it is by running the NORMAL LOCATION SERVICE in background, not the "significant location service". a special option that can be set in the plist file.

there is no way to close the Low Power mode of location services - "Significant location service" when the user kills the app, because it was not intended to be used this way.

I guess I will simply have to follow apple's standards using significant location service.


did you have a look at this post: Behaviour for significant change location API when terminated/suspended?

Lots of interesting things in it. In particular, you should stopMonitoringSignificantLocationChanges on entering background and register for significant location changes with a Service

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜