Running CLLocation when the application is in the background

How can I save a CLLocation update in the background. I believe that you need to register the application for this in the applicationโ€™s application, but I canโ€™t find a link to it somewhere?

+4
source share
1 answer

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 may make itself known as a constant update of the background location. An application that needs regular location updates, both in the foreground and in the background, must add the UIBackgroundModes key to its Info.plist file and set the value of this key to an array containing the location string. This parameter is intended for applications that provide certain services, such as navigation services, which include constantly informing the user of his whereabouts. The presence of a key in the application file Info.plist tells the system that it should allow the application to start as necessary in the background

+5
source

Source: https://habr.com/ru/post/1337379/


All Articles