开发者

Running CLLocation when Application is in background

开发者 https://www.devze.com 2023-02-07 07:13 出处:网络
How is it possible to keep CLLoc开发者_开发技巧ation 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

How is it possible to keep CLLoc开发者_开发技巧ation 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?


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

0

精彩评论

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