Question

How is it possible to keep CLLocation updating in the background. I believe you need to register the application to do this in the Application delegate but I can not find a reference to this anywhere?

Was it helpful?

Solution

Here is a link to the relevant documentation:

https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW20

in particular, see this paragraph:

An application can declare itself as needing continuous background location updates. An application that needs regular location updates, both in the foreground and background, should add the UIBackgroundModes key to its Info.plist file and set the value of this key to an array containing the location string. This option is intended for applications that provide specific services, such as navigation services, that involve keeping the user informed of his or her location at all times. The presence of the key in the application’s Info.plist file tells the system that it should allow the application to run as needed in the background

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top